diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 80aea081ad..3e99ea972d 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -413,7 +413,7 @@ class StatsUsage extends Action return; } } - $documentClone = new Document($stat->getArrayCopy()); + $documentClone = clone $stat; $documentClone->setAttribute('$tenant', (int) $project->getInternalId()); $this->statDocuments[] = $documentClone; }