Don't try to store nil for the metadata
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user