DirectorObjectForm: fix redirectionUrl for...
...objects without id fixes #1043
This commit is contained in:
parent
b2736e1776
commit
74a887f5af
|
@ -267,6 +267,9 @@ abstract class DbObject
|
|||
{
|
||||
if (array_key_exists($key, $this->properties)) {
|
||||
return true;
|
||||
} elseif ($key === 'id') {
|
||||
// There is getId, would give false positive
|
||||
return false;
|
||||
}
|
||||
$func = 'get' . ucfirst($key);
|
||||
if (substr($func, -2) === '[]') {
|
||||
|
|
|
@ -579,7 +579,7 @@ abstract class DirectorObjectForm extends DirectorForm
|
|||
$object->getUrlParams()
|
||||
);
|
||||
} elseif ($object->hasProperty('id')) {
|
||||
$this->setSuccessUrl($this->getSuccessUrl()->with('id', $object->get('id')));
|
||||
$this->setSuccessUrl($this->getSuccessUrl()->with('id', $object->getProperty('id')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue