From 1474bd65b0405bc0a1ac1ab2a708270475a7ffed Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 25 Feb 2024 10:57:41 +0200 Subject: [PATCH] Rename $collectionDocument --- app/controllers/api/databases.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 2e11630e0..fdb986b15 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1622,8 +1622,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); if ($collection->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND);