mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Format
This commit is contained in:
parent
369c19039c
commit
75a1e5ca4a
1 changed files with 4 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ class V20 extends Filter
|
|||
|
||||
// Handle case where queries is an array but empty
|
||||
if (\is_array($content['queries'])) {
|
||||
$content['queries'] = \array_filter($content['queries'], function($q) {
|
||||
$content['queries'] = \array_filter($content['queries'], function ($q) {
|
||||
if (\is_object($q) && empty((array)$q)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ class V20 extends Filter
|
|||
}
|
||||
|
||||
$selections = Query::groupByType($parsed)['selections'] ?? [];
|
||||
|
||||
|
||||
// Check if we need to add wildcard + relationships
|
||||
// This happens when:
|
||||
// 1. No select queries exist, OR
|
||||
|
|
@ -123,7 +123,7 @@ class V20 extends Filter
|
|||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// Check if we've already visited this collection in the current path to prevent cycles
|
||||
if (in_array($collectionId, $visited)) {
|
||||
return [];
|
||||
|
|
@ -163,7 +163,7 @@ class V20 extends Filter
|
|||
$key = $attr['key'];
|
||||
$fullKey = $prefix ? $prefix . '.' . $key : $key;
|
||||
$relatedCollectionId = $attr['relatedCollection'] ?? null;
|
||||
|
||||
|
||||
// Skip this relationship entirely if it points to an already visited collection
|
||||
if ($relatedCollectionId && in_array($relatedCollectionId, $visited)) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue