If the listsHosts API function is called, but with arch being an empty list (rather than None), the hub generates the following query:
[Sun Jun 18 21:48:59.793991 2017] [:error] [pid 16950] SELECT id, user_id, name, arches, task_load, capacity, description, comment, ready, enabled [Sun Jun 18 21:48:59.793995 2017] [:error] [pid 16950] FROM host [Sun Jun 18 21:48:59.793999 2017] [:error] [pid 16950] JOIN host_channels on host.id = host_channels.host_id [Sun Jun 18 21:48:59.794001 2017] [:error] [pid 16950] WHERE (()) [Sun Jun 18 21:48:59.794003 2017] [:error] [pid 16950] AND (host_channels.channel_id = 1) [Sun Jun 18 21:48:59.794006 2017] [:error] [pid 16950] AND (enabled is true)
And WHERE (()) is not valid SQL.
This problem comes from hub/kojihub.py, line 10501-10507.
PR #465
Metadata Update from @tkopecek: - Issue set to the milestone: 1.13
Commit e7dd4b36 fixes this issue
Commit 1a7074db relates to this ticket
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/463
Please continue any further discussion there.