From 246dc070180648bf4cb22862cf5d2f085e584267 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 23 Jan 2025 18:47:12 +0530 Subject: [PATCH] Remove unnecessary check --- app/controllers/api/console.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.'); }