mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
DirectorObjectForm: use autoinc for ints
This commit is contained in:
parent
8d61fa6347
commit
ac0745445e
@ -990,7 +990,11 @@ abstract class DirectorObjectForm extends DirectorForm
|
|||||||
{
|
{
|
||||||
/** @var DbObject $class */
|
/** @var DbObject $class */
|
||||||
$class = $this->getObjectClassname();
|
$class = $this->getObjectClassname();
|
||||||
$this->object = $class::load($id, $this->db);
|
if (is_int($id)) {
|
||||||
|
$this->object = $class::loadWithAutoIncId($id, $this->db);
|
||||||
|
} else {
|
||||||
|
$this->object = $class::load($id, $this->db);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: hmmmm...
|
// TODO: hmmmm...
|
||||||
if (! is_array($id) && $this->object->getKeyName() === 'id') {
|
if (! is_array($id) && $this->object->getKeyName() === 'id') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user