mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fix date fields not being nulled correctly when cleared (#3243)
* Interpret empty string date as null * Fix setSQLiteDate for null
This commit is contained in:
@@ -102,11 +102,11 @@ func (r *updateRecord) setSQLiteDate(destField string, v models.OptionalDate) {
|
||||
if v.Set {
|
||||
if v.Null {
|
||||
r.set(destField, models.SQLiteDate{})
|
||||
} else {
|
||||
r.set(destField, models.SQLiteDate{
|
||||
String: v.Value.String(),
|
||||
Valid: true,
|
||||
})
|
||||
}
|
||||
|
||||
r.set(destField, models.SQLiteDate{
|
||||
String: v.Value.String(),
|
||||
Valid: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user