From d7b32cfc3e38ed1726a39896cb30068d903a91a0 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 24 May 2023 21:36:08 +0300 Subject: [PATCH] downgraded csv writer ver --- src/Appwrite/Platform/Tasks/CalcUsersStats.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/CalcUsersStats.php b/src/Appwrite/Platform/Tasks/CalcUsersStats.php index 3811ca0ff3..5657ac5daf 100644 --- a/src/Appwrite/Platform/Tasks/CalcUsersStats.php +++ b/src/Appwrite/Platform/Tasks/CalcUsersStats.php @@ -105,15 +105,17 @@ class CalcUsersStats extends Action /** Get Team Name and Id */ $teamId = $project->getAttribute('teamId', null); + $teamName = null; if ($teamId) { $team = $dbForConsole->getDocument('teams', $teamId); + $teamName = $team->getAttribute('name'); } - $stats['Team ID'] = $team->getId() ?? 'N/A'; - $stats['Team name'] = $team->getAttribute('name', 'N/A'); + $stats['Team ID'] = $teamId; + $stats['Team name'] = $teamName; /** Get Total Users */ - $stats['users'] = $dbForProject->count('users', [], APP_LIMIT_COUNT); + $stats['users'] = $dbForProject->count('users', []); $csv->insertOne(array_values($stats)); } catch (\Throwable $th) {