Fixed exception when try to create a new part.

This commit is contained in:
Jan Böhmer 2019-10-06 15:49:42 +02:00
parent 4c7767feed
commit ac3e5d2669

View file

@ -136,8 +136,10 @@ class ElementPermissionListener
if ((!$this->security->isGranted($annotation->getEditOperationName(), $element)
|| !$this->security->isGranted($annotation->getReadOperationName(), $element))) {
//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()]);
$changed = true;
}
}