SyncPropertyForm: explicit ID handling

This commit is contained in:
Thomas Gelf 2018-10-06 17:08:28 +02:00
parent 93cbd4f020
commit 9390a3b9ca
1 changed files with 3 additions and 2 deletions

View File

@ -368,10 +368,11 @@ class SyncPropertyForm extends DirectorObjectForm
{ {
if ($this->importSource === null) { if ($this->importSource === null) {
if ($this->hasObject()) { if ($this->hasObject()) {
$this->importSource = ImportSource::load($this->object->get('source_id'), $this->db); $id = (int) $this->object->get('source_id');
} else { } else {
$this->importSource = ImportSource::load($this->getSentValue('source_id'), $this->db); $id = (int) $this->getSentValue('source_id');
} }
$this->importSource = ImportSource::loadWithAutoIncId($id, $this->db);
} }
return $this->importSource; return $this->importSource;