Skip to content

Commit

Permalink
Fix Location parent different validation on new location creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeltzer committed Apr 28, 2020
1 parent 82de51f commit c74b904
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/LocationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function store(ImageUploadRequest $request)
{
$this->authorize('create', Location::class);
$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->parent_id = $request->input('parent_id', null);
$location->currency = $request->input('currency', '$');
Expand Down

0 comments on commit c74b904

Please sign in to comment.