Merge branch 'master' into master

This commit is contained in:
Amit Basuri 2020-10-30 17:20:00 +05:30 committed by GitHub
commit 0c71c43a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,11 +26,11 @@ func (n DeletedAt) Value() (driver.Value, error) {
} }
func (n DeletedAt) MarshalJSON() ([]byte, error) { func (n DeletedAt) MarshalJSON() ([]byte, error) {
if !n.Valid { if n.Valid {
return []byte(`null`), nil
}
return json.Marshal(n.Time) return json.Marshal(n.Time)
} }
return json.Marshal(nil)
}
func (n *DeletedAt) UnmarshalJSON(b []byte) error { func (n *DeletedAt) UnmarshalJSON(b []byte) error {
if string(b) == "null" { if string(b) == "null" {