mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-04 22:45:56 +01:00
Fixed some inspection issues.
This commit is contained in:
@@ -114,12 +114,10 @@ class GroupController extends BaseAdminController
|
||||
|
||||
public function deleteCheck(AbstractNamedDBElement $entity): bool
|
||||
{
|
||||
if ($entity instanceof Group) {
|
||||
if ($entity->getUsers()->count() > 0) {
|
||||
$this->addFlash('error', 'entity.delete.must_not_contain_users');
|
||||
if (($entity instanceof Group) && $entity->getUsers()->count() > 0) {
|
||||
$this->addFlash('error', 'entity.delete.must_not_contain_users');
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user