mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 23:36:58 +00:00
don't return nonnullable error if default is set
This commit is contained in:
committed by
Darren Shepherd
parent
d4e7ad28b8
commit
409b391766
@@ -162,7 +162,9 @@ func checkFieldCriteria(fieldName string, field types.Field, value interface{})
|
||||
}
|
||||
|
||||
if (value == nil || value == "") && !field.Nullable {
|
||||
return httperror.NewFieldAPIError(httperror.NotNullable, fieldName, "")
|
||||
if field.Default == nil {
|
||||
return httperror.NewFieldAPIError(httperror.NotNullable, fieldName, "")
|
||||
}
|
||||
}
|
||||
|
||||
if isNum {
|
||||
|
Reference in New Issue
Block a user