mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Skip model check for custom fields change
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
9e1cfac995
commit
41fd717d6a
|
@ -130,12 +130,7 @@ class BulkAssetsController extends Controller
|
|||
}
|
||||
|
||||
$assets = array_keys($request->input('ids'));
|
||||
|
||||
if ($request->anyFilled($custom_field_columns)) {
|
||||
$custom_fields_present = true;
|
||||
} else {
|
||||
$custom_fields_present = false;
|
||||
}
|
||||
|
||||
if (($request->filled('purchase_date'))
|
||||
|| ($request->filled('expected_checkin'))
|
||||
|| ($request->filled('purchase_cost'))
|
||||
|
@ -154,6 +149,7 @@ class BulkAssetsController extends Controller
|
|||
|| ($request->anyFilled($custom_field_columns))
|
||||
|
||||
) {
|
||||
|
||||
foreach ($assets as $assetId) {
|
||||
|
||||
$this->update_array = [];
|
||||
|
@ -216,9 +212,7 @@ class BulkAssetsController extends Controller
|
|||
$changed[$key]['new'] = $this->update_array[$key];
|
||||
}
|
||||
}
|
||||
|
||||
if ($custom_fields_present) {
|
||||
|
||||
|
||||
$model = $asset->model()->first();
|
||||
|
||||
// Use the rules of the new model fieldsets if the model changed
|
||||
|
@ -274,8 +268,6 @@ class BulkAssetsController extends Controller
|
|||
|
||||
} // endforeach
|
||||
} // end custom field check
|
||||
} // end custom fields handler
|
||||
|
||||
|
||||
|
||||
// Check if it passes validation, and then try to save
|
||||
|
|
Loading…
Reference in a new issue