RoleForm: Fix self reference when creating a new role without parent
This commit is contained in:
parent
1890e0e745
commit
544febe84e
|
@ -551,7 +551,7 @@ class RoleForm extends RepositoryForm
|
|||
return false;
|
||||
}
|
||||
|
||||
if (($newName = $this->getValue('name')) !== $this->getIdentifier()) {
|
||||
if ($this->getIdentifier() && ($newName = $this->getValue('name')) !== $this->getIdentifier()) {
|
||||
$this->repository->update(
|
||||
$this->getBaseTable(),
|
||||
['parent' => $newName],
|
||||
|
|
Loading…
Reference in New Issue