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);