PR#1409: Fix SQL after introduction of host_config

Merges #1409
https://pagure.io/koji/pull-request/1409

Fixes: #1381
https://pagure.io/koji/issue/1381
host.isEnabled API call returns psycopg2.ProgrammingError fault
This commit is contained in:
Mike McLean 2019-05-05 14:40:25 -04:00
commit acb38cb82e

View file

@ -11898,7 +11898,7 @@ class Host(object):
def isEnabled(self):
"""Return whether this host is enabled or not."""
query = """SELECT enabled FROM host_config WHERE id = %(id)i AND active IS TRUE"""
query = """SELECT enabled FROM host_config WHERE host_id = %(id)i AND active IS TRUE"""
return _singleValue(query, {'id': self.id}, strict=True)
class HostExports(object):