1
0
Fork 0
mirror of synced 2024-06-17 18:24:51 +12:00

Merge pull request #1368 from appwrite/fix-filtertypes-without-rules

fix(database): default value for empty rules
This commit is contained in:
Eldad A. Fux 2021-07-07 15:12:43 +03:00 committed by GitHub
commit ecd1026b9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -437,7 +437,7 @@ App::get('/v1/database/collections/:collectionId/documents')
}
$types = [];
foreach ($collection->getAttribute('rules') as $rule) {
foreach ($collection->getAttribute('rules', []) as $rule) {
/** @var Document $rule */
$types[$rule->getAttribute('key')] = $rule->getAttribute('type');
}
@ -630,4 +630,4 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId')
;
$response->noContent();
});
});