Fixed RB-19892

Check for location before trying to grab company property

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-07-02 11:57:42 +01:00
parent 759e30977b
commit 699e9f75c9
+1 -1
View File
@@ -362,7 +362,7 @@ class ValidationServiceProvider extends ServiceProvider
$company_id = array_get($validator->getData(), 'company_id');
$location = Location::find($value);
if ($company_id != $location->company_id) {
if (($location) && ($company_id != $location->company_id)) {
return false;
}
}