Don't try to store nil for the metadata

This commit is contained in:
DaneEveritt 2022-07-24 16:27:05 -04:00
parent 21cf66b2b4
commit f952efd9c7
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -60,5 +60,8 @@ func (a *Activity) BeforeCreate(_ *gorm.DB) error {
a.Timestamp = time.Now()
}
a.Timestamp = a.Timestamp.UTC()
if a.Metadata == nil {
a.Metadata = ActivityMeta{}
}
return nil
}