mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 10:21:05 +01:00
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')\n GROUP BY queue, name\n ORDER BY q.id' at line 9") helpdesk/views/staff.py in dashboard 149 solved. When queues is null do not add to sql q.id in ()
This commit is contained in:
parent
abf03d48d6
commit
2b6c23db9f
@ -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("""
|
||||
|
Loading…
Reference in New Issue
Block a user