mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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;
|
$asset->supplier_id = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('requestable')) {
|
// If the box isn't checked, it's not in the request at all.
|
||||||
$asset->requestable = e($request->input('requestable'));
|
$asset->requestable = $request->has('requestable');
|
||||||
} else {
|
|
||||||
$asset->requestable = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->has('rtd_location_id')) {
|
if ($request->has('rtd_location_id')) {
|
||||||
$asset->rtd_location_id = e($request->input('rtd_location_id'));
|
$asset->rtd_location_id = e($request->input('rtd_location_id'));
|
||||||
} else {
|
} else {
|
||||||
$asset->requestable = null;
|
$asset->rtd_location_id = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('image_delete')) {
|
if ($request->has('image_delete')) {
|
||||||
|
|
Loading…
Reference in a new issue