From ca4b16a7cc7d6ea67ab1bcc226f6e9a84574c965 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Sat, 13 Nov 2021 11:19:37 +0100 Subject: [PATCH] Fix Group resource returning null twofaccounts_count --- app/Api/v1/Resources/GroupResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Api/v1/Resources/GroupResource.php b/app/Api/v1/Resources/GroupResource.php index 507b7ad4..4d2277f8 100644 --- a/app/Api/v1/Resources/GroupResource.php +++ b/app/Api/v1/Resources/GroupResource.php @@ -17,7 +17,7 @@ public function toArray($request) return [ 'id' => $this->id, 'name' => $this->name, - 'twofaccounts_count' => $this->twofaccounts_count, + 'twofaccounts_count' => is_null($this->twofaccounts_count) ? 0 : $this->twofaccounts_count, ]; } } \ No newline at end of file