mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 15:18:20 +00:00
Refactor access control to return error not bool
This commit is contained in:
@@ -137,6 +137,8 @@ func (b *Builder) checkDefaultAndRequired(schema *types.Schema, input map[string
|
||||
|
||||
if op.IsList() && fieldMatchesOp(field, List) && definition.IsReferenceType(field.Type) && !hasKey {
|
||||
result[fieldName] = nil
|
||||
} else if op.IsList() && fieldMatchesOp(field, List) && !hasKey && field.Default != nil {
|
||||
result[fieldName] = field.Default
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user