mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
dumb fix
This commit is contained in:
parent
c32f4e34b4
commit
3153bbb13f
|
@ -23,7 +23,7 @@ trait MayContainCustomFields
|
||||||
return str_starts_with($attributes, '_snipeit_');
|
return str_starts_with($attributes, '_snipeit_');
|
||||||
});
|
});
|
||||||
// if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag
|
// if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag
|
||||||
if (count($request_fields) > 0) {
|
if (count($request_fields) > 0 && $validator->errors()->isEmpty()) {
|
||||||
$request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column'))
|
$request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column'))
|
||||||
->each(function ($request_field_name) use ($request_fields, $validator) {
|
->each(function ($request_field_name) use ($request_fields, $validator) {
|
||||||
if (CustomField::where('db_column', $request_field_name)->exists()) {
|
if (CustomField::where('db_column', $request_field_name)->exists()) {
|
||||||
|
|
Loading…
Reference in a new issue