From 1daef72ca9edf24117908399ee43456355377c3f Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 22 Jan 2026 17:23:46 +0200 Subject: [PATCH] allow nulls --- .../Utopia/Database/Validator/Queries/Projects.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php index 1c624d00c6..3990eba3fb 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php @@ -12,21 +12,16 @@ class Projects extends Base ]; /** - * Expression constructor - * + * @param array|null $allowedAttributes + * @throws \Exception */ - public function __construct() + public function __construct(array $allowedAttributes = null) { - parent::__construct('projects', $this->getAllowedAttributes()); + parent::__construct('projects', $allowedAttributes ?? static::ALLOWED_ATTRIBUTES); } public function isSelectQueryAllowed(): bool { return true; } - - public function getAllowedAttributes(): array - { - return self::ALLOWED_ATTRIBUTES; - } }