mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update app/controllers/api/databases.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
This commit is contained in:
co-authored by
Christy Jacob
parent
72f203b365
commit
2153f65893
@@ -102,7 +102,7 @@ function createAttribute(string $databaseId, string $collectionId, Document $att
|
||||
|
||||
if ($type === Database::VAR_RELATIONSHIP) {
|
||||
$options['side'] = Database::RELATION_SIDE_PARENT;
|
||||
$relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']);
|
||||
$relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? '');
|
||||
if ($relatedCollection->isEmpty()) {
|
||||
throw new Exception(Exception::COLLECTION_NOT_FOUND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user