mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 06:24:34 +02:00
Fixed exception when try to create a new part.
This commit is contained in:
parent
4c7767feed
commit
ac3e5d2669
1 changed files with 5 additions and 3 deletions
|
@ -136,8 +136,10 @@ class ElementPermissionListener
|
||||||
if ((!$this->security->isGranted($annotation->getEditOperationName(), $element)
|
if ((!$this->security->isGranted($annotation->getEditOperationName(), $element)
|
||||||
|| !$this->security->isGranted($annotation->getReadOperationName(), $element))) {
|
|| !$this->security->isGranted($annotation->getReadOperationName(), $element))) {
|
||||||
//Set value to old value, so that there a no change to this property
|
//Set value to old value, so that there a no change to this property
|
||||||
|
if (isset($old_data[$property->getName()])) {
|
||||||
$property->setValue($element, $old_data[$property->getName()]);
|
$property->setValue($element, $old_data[$property->getName()]);
|
||||||
$changed = true;
|
$changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue