Skip to content

Commit

Permalink
Merge pull request #11737 from inietov/fixes/validation_error_still_w…
Browse files Browse the repository at this point in the history
…ithout_required_rule

Fixed Validation error when empty default customfield values
  • Loading branch information
snipe committed Aug 26, 2022
2 parents 4fd1827 + 1ff2d15 commit 96ec96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/AssetModelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ private function assignCustomFieldsDefaultValues(AssetModel $model, array $defau
// (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;
}
Expand Down

0 comments on commit 96ec96f

Please sign in to comment.