From 4d03f1e110b02e5a75bf931a6674b67c269c12de Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Aug 2024 09:46:18 +0100 Subject: [PATCH] Fixed #15341 - validate parent ID Signed-off-by: snipe --- app/Models/Location.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Location.php b/app/Models/Location.php index f08a51a985..e6c310979b 100755 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -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 = [