mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Merge pull request #2202 from dmeltzer/sqlite-fix-asset-edit
Fix integrity constraint violation on sqlite.
This commit is contained in:
commit
e3fe80e2a5
|
@ -352,16 +352,13 @@ class AssetsController extends Controller
|
|||
$asset->supplier_id = null;
|
||||
}
|
||||
|
||||
if ($request->has('requestable')) {
|
||||
$asset->requestable = e($request->input('requestable'));
|
||||
} else {
|
||||
$asset->requestable = null;
|
||||
}
|
||||
// If the box isn't checked, it's not in the request at all.
|
||||
$asset->requestable = $request->has('requestable');
|
||||
|
||||
if ($request->has('rtd_location_id')) {
|
||||
$asset->rtd_location_id = e($request->input('rtd_location_id'));
|
||||
} else {
|
||||
$asset->requestable = null;
|
||||
$asset->rtd_location_id = null;
|
||||
}
|
||||
|
||||
if ($request->has('image_delete')) {
|
||||
|
|
Loading…
Reference in a new issue