Skip to content

Commit 4269cb4

Browse files
committed
Bugfix on Default field asign
1 parent 019c94b commit 4269cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

schema/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (s Schema) Prepare(payload map[string]interface{}, original *map[string]int
145145
if !found || value == nil {
146146
// Add default fields
147147
if def.Default != nil {
148-
base[field] = value
148+
base[field] = def.Default
149149
}
150150
} else if found {
151151
changes[field] = value

0 commit comments

Comments
 (0)