fix function to work also with empty table

This commit is contained in:
Dario Rekowski on RockPI 2021-05-13 10:50:07 +00:00
parent 97c570c08c
commit 77f6f679d2

View File

@ -426,6 +426,9 @@ class TransactionsTable extends Table
}
}
}
if(count($state_user_ids) < 1) {
return ['success' => true];
}
//var_dump($entities);
$stateUsersTable = TableRegistry::getTableLocator()->get('StateUsers');
$existingStateUsers = $stateUsersTable->find('all')->select(['id'])->where(['id IN' => $state_user_ids])->order(['id'])->all();