Icingaweb2 director SQLSTATE[42000]: Syntax error on editing services

I’m crossposting this here as it’s more of an issue in director than it is icingaweb2 itself I suspect.

My other post:
https://community.icinga.com/t/icingaweb2-sqlstate-syntax-error-on-modify-a-service-for-director/14375

Shows the issue, it appears to be in code:

/usr/share/icingaweb2/modules/director/library/Director/DataType/DataTypeDatalist.php
Where the $this->getSetting(‘datalist_id’) is not returning a value and causing an SQL exception.
I commented this out as a quick test:

    protected function getEntries(QuickForm $form)
    {
        /** @var DirectorObjectForm $form */
        $db = $form->getDb()->getDbAdapter();
        $roles = Acl::instance()->listRoleNames();
        $select = $db->select()
            ->from('director_datalist_entry', ['entry_name', 'entry_value'])
//            ->where('list_id = ?', $this->getSetting('datalist_id'))
            ->order('entry_value ASC');

        if (empty($roles)) {
            $select->where('allowed_roles IS NULL');
        } else {
            $parts = ['allowed_roles IS NULL'];
            foreach ($roles as $role) {
                $parts[] = $db->quoteInto("allowed_roles LIKE ?", '%' . \json_encode($role) . '%');
            }
            $select->where('(' . \implode(' OR ', $parts) . ')');
        }

        return $db->fetchPairs($select);
    }

which worked.
I don’t have any datalist’s defined so this is probably the issue, has a check somewhere been missed?