From c927f3f9ab0a71127d47cdb4b9e503effc084315 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Fri, 8 Oct 2021 00:52:15 +0200 Subject: [PATCH] Fix single TwoFAccount association to group --- app/Services/GroupService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Services/GroupService.php b/app/Services/GroupService.php index 758b5d41..300fdb29 100644 --- a/app/Services/GroupService.php +++ b/app/Services/GroupService.php @@ -116,6 +116,9 @@ public function assign($ids, Group $group = null) : Group $group = $this->destinationGroup(); } + if (!is_array($ids)) { + $ids = array($ids); + } $twofaccounts = TwoFAccount::find($ids); $group->twofaccounts()->saveMany($twofaccounts);