diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index 6af7b51995..3052103c5b 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -135,7 +135,7 @@ App::get('v1/console/resources/:resourceId') ->action(function (string $resourceId, string $type, Response $response, Database $dbForConsole) { $document = Authorization::skip(fn () => $dbForConsole->getDocument('rules', $resourceId)); - if ($document && !$document->isEmpty()) { + if (!$document->isEmpty()) { throw new Exception(Exception::RESOURCE_ALREADY_EXISTS, 'Resource ID is already in use.'); }