1
0
Fork 0
mirror of synced 2024-06-01 10:29:48 +12:00

Fix project pagination in usage containers

This commit is contained in:
Matej Bačo 2022-10-17 11:45:38 +00:00
parent d625eb6508
commit 97df10e6b8
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
# Version 1.0.4
- Fix project pagination in DB usage collector [#X](X)
# Version 1.0.3
## Bugs
- Fix document audit deletion [#4429](https://github.com/appwrite/appwrite/pull/4429)

View file

@ -132,7 +132,6 @@ class Database extends Calculator
$results = [];
$sum = $limit;
$latestDocument = null;
$this->database->setNamespace('_' . $projectId);
while ($sum === $limit) {
try {
@ -140,6 +139,8 @@ class Database extends Calculator
if ($latestDocument !== null) {
$paginationQueries[] = Query::cursorAfter($latestDocument);
}
$this->database->setNamespace('_' . $projectId);
$results = $this->database->find($collection, \array_merge($paginationQueries, $queries));
} catch (\Exception $e) {
if (is_callable($this->errorHandler)) {