Fixed #15341 - validate parent ID

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-21 09:46:18 +01:00
parent 09033b19a7
commit 4d03f1e110

View file

@ -33,7 +33,7 @@ class Location extends SnipeModel
'country' => 'min:2|max:191|nullable',
'zip' => 'max:10|nullable',
'manager_id' => 'exists:users,id|nullable',
'parent_id' => 'non_circular:locations,id',
'parent_id' => 'nullable|exists:locations,id|non_circular:locations,id',
];
protected $casts = [