DirectorObjectForm: more restrictive auto-id field
This commit is contained in:
parent
d931eee9b3
commit
b9bd71cc13
|
@ -438,8 +438,8 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
$this->object = $class::load($id, $this->db);
|
||||
|
||||
// TODO: hmmmm...
|
||||
if (! is_array($id)) {
|
||||
$this->addHidden('id');
|
||||
if (! is_array($id) && $this->object->getKeyName() === 'id') {
|
||||
$this->addHidden('id', $id);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
|
Loading…
Reference in New Issue