Merge pull request #388 from pawelmarkowski/master

dashboard error queues are null
This commit is contained in:
Ross Poulton 2016-03-02 10:38:08 +11:00
commit e52ae206c6

View File

@ -132,8 +132,11 @@ def dashboard(request):
from_clause = """FROM helpdesk_ticket t,
helpdesk_queue q"""
where_clause = """WHERE q.id = t.queue_id AND
q.id IN (%s)""" % (",".join(("%d" % pk for pk in queues)))
if queues:
where_clause = """WHERE q.id = t.queue_id AND
q.id IN (%s)""" % (",".join(("%d" % pk for pk in queues)))
else:
where_clause = """WHERE q.id = t.queue_id"""
cursor = connection.cursor()
cursor.execute("""