mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fix Location parent different validation on new location creation.
This commit is contained in:
parent
82de51f23e
commit
c74b904f14
|
@ -67,6 +67,7 @@ class LocationsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize('create', Location::class);
|
$this->authorize('create', Location::class);
|
||||||
$location = new Location();
|
$location = new Location();
|
||||||
|
$location->id = null; // This is required to make Laravels different validation work, it errors if the parameter doesn't exist (maybe a bug)?
|
||||||
$location->name = $request->input('name');
|
$location->name = $request->input('name');
|
||||||
$location->parent_id = $request->input('parent_id', null);
|
$location->parent_id = $request->input('parent_id', null);
|
||||||
$location->currency = $request->input('currency', '$');
|
$location->currency = $request->input('currency', '$');
|
||||||
|
|
Loading…
Reference in a new issue