force use of autoincrement id for generating the SQL query

This commit is contained in:
Florian Bachmann 2017-10-20 08:55:13 +02:00 committed by Thomas Gelf
parent bbb180bb6e
commit 7cc23bf1bf
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class IcingaTemplateChoiceForm extends DirectorObjectForm
if ($object->hasBeenLoadedFromDb()) { if ($object->hasBeenLoadedFromDb()) {
$query->where( $query->where(
'o.template_choice_id IS NULL OR o.template_choice_id = ?', 'o.template_choice_id IS NULL OR o.template_choice_id = ?',
$this->object()->getId() $object->get('id')
); );
} else { } else {
$query->where('o.template_choice_id IS NULL'); $query->where('o.template_choice_id IS NULL');