DirectorObjectForm: more restrictive auto-id field

This commit is contained in:
Thomas Gelf 2015-08-02 15:09:57 +02:00
parent d931eee9b3
commit b9bd71cc13
1 changed files with 2 additions and 2 deletions

View File

@ -438,8 +438,8 @@ abstract class DirectorObjectForm extends QuickForm
$this->object = $class::load($id, $this->db); $this->object = $class::load($id, $this->db);
// TODO: hmmmm... // TODO: hmmmm...
if (! is_array($id)) { if (! is_array($id) && $this->object->getKeyName() === 'id') {
$this->addHidden('id'); $this->addHidden('id', $id);
} }
return $this; return $this;