Don't try to store nil for the metadata
This commit is contained in:
parent
21cf66b2b4
commit
f952efd9c7
|
@ -60,5 +60,8 @@ func (a *Activity) BeforeCreate(_ *gorm.DB) error {
|
||||||
a.Timestamp = time.Now()
|
a.Timestamp = time.Now()
|
||||||
}
|
}
|
||||||
a.Timestamp = a.Timestamp.UTC()
|
a.Timestamp = a.Timestamp.UTC()
|
||||||
|
if a.Metadata == nil {
|
||||||
|
a.Metadata = ActivityMeta{}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user