RoleForm: Fix self reference when creating a new role without parent

This commit is contained in:
Johannes Meyer 2021-03-19 09:03:19 +01:00
parent 1890e0e745
commit 544febe84e
1 changed files with 1 additions and 1 deletions

View File

@ -551,7 +551,7 @@ class RoleForm extends RepositoryForm
return false; return false;
} }
if (($newName = $this->getValue('name')) !== $this->getIdentifier()) { if ($this->getIdentifier() && ($newName = $this->getValue('name')) !== $this->getIdentifier()) {
$this->repository->update( $this->repository->update(
$this->getBaseTable(), $this->getBaseTable(),
['parent' => $newName], ['parent' => $newName],