diff --git a/internal/models/activity.go b/internal/models/activity.go index 1c3623b..bbbe38d 100644 --- a/internal/models/activity.go +++ b/internal/models/activity.go @@ -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 }