Merge pull request #11737 from inietov/fixes/validation_error_still_without_required_rule

Fixed Validation error when empty default customfield values
This commit is contained in:
snipe 2022-08-25 17:54:04 -07:00 committed by GitHub
commit 96ec96ff7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -471,7 +471,7 @@ class AssetModelsController extends Controller
// (we are at model level, the rule still applies when creating a new asset using this model)
$index = array_search('required', $validation);
if ($index !== false){
unset($validation[$index]);
$validation[$index] = 'nullable';
}
$rules[$fieldset] = $validation;
}