mirror of
https://github.com/rancher/norman.git
synced 2025-08-12 12:41:57 +00:00
don't return nonnullable error if default is set
This commit is contained in:
parent
d4e7ad28b8
commit
409b391766
@ -162,8 +162,10 @@ func checkFieldCriteria(fieldName string, field types.Field, value interface{})
|
||||
}
|
||||
|
||||
if (value == nil || value == "") && !field.Nullable {
|
||||
if field.Default == nil {
|
||||
return httperror.NewFieldAPIError(httperror.NotNullable, fieldName, "")
|
||||
}
|
||||
}
|
||||
|
||||
if isNum {
|
||||
if field.Min != nil && numVal < *field.Min {
|
||||
|
Loading…
Reference in New Issue
Block a user