mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-24 21:05:03 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
6caf605fe2
commit
e01b06fb85
80 changed files with 173 additions and 218 deletions
src/Controller
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue