Merge pull request #2202 from dmeltzer/sqlite-fix-asset-edit

Fix integrity constraint violation on sqlite.
This commit is contained in:
snipe 2016-06-27 20:20:01 -07:00 committed by GitHub
commit e3fe80e2a5

View file

@ -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')) {