diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 6bc0c5b290fc..39b7f5fc1459 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -95,6 +95,10 @@ class EntityModel extends Eloquent */ public static function getPrivateId($publicId) { + if (! $publicId) { + return null; + } + $className = get_called_class(); return $className::scope($publicId)->withTrashed()->value('id');