Merge branch 'feat-create-function-abuse-fix' of github.com:appwrite/appwrite into feat-create-function-abuse-fix

This commit is contained in:
Matej Bačo 2024-12-12 21:00:19 +01:00
commit fcd991fff2
2 changed files with 4 additions and 6 deletions

View file

@ -60,12 +60,13 @@ class Usage extends Action
}
$document = $payload['project'] ?? [];
$project = new Document($document);
if (empty($document)) {
if (empty($project->getAttribute('database'))) {
var_dump($payload);
return;
}
$project = new Document($document);
$projectId = $project->getInternalId();
foreach ($payload['reduce'] ?? [] as $document) {
if (empty($document)) {
@ -80,6 +81,7 @@ class Usage extends Action
);
}
$this->stats[$projectId]['project'] = [
'$id' => $project->getId(),
'$internalId' => $project->getInternalId(),

View file

@ -71,10 +71,6 @@ class UsageDump extends Action
$project = new Document($document);
if (empty($project->getAttribute('database'))) {
var_dump($stats);
}
/**
* End temp bug fallback
*/