Skip to content

Commit

Permalink
Merge pull request #331 from reduxionist/fix-reports_CHOICES_display
Browse files Browse the repository at this point in the history
As of at least Django 1.5, calling __str__() on a CHOICES object…
  • Loading branch information
rossp committed Jun 11, 2015
2 parents 6595eeb + 711eb6c commit 9807356
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helpdesk/views/staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def run_report(request, report):
if report == 'userpriority':
title = _('User by Priority')
col1heading = _('User')
possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES]
possible_options = [t[1].title() for t in Ticket.PRIORITY_CHOICES]
charttype = 'bar'

elif report == 'userqueue':
Expand All @@ -1025,7 +1025,7 @@ def run_report(request, report):
elif report == 'userstatus':
title = _('User by Status')
col1heading = _('User')
possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES]
possible_options = [s[1].title() for s in Ticket.STATUS_CHOICES]
charttype = 'bar'

elif report == 'usermonth':
Expand All @@ -1037,13 +1037,13 @@ def run_report(request, report):
elif report == 'queuepriority':
title = _('Queue by Priority')
col1heading = _('Queue')
possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES]
possible_options = [t[1].title() for t in Ticket.PRIORITY_CHOICES]
charttype = 'bar'

elif report == 'queuestatus':
title = _('Queue by Status')
col1heading = _('Queue')
possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES]
possible_options = [s[1].title() for s in Ticket.STATUS_CHOICES]
charttype = 'bar'

elif report == 'queuemonth':
Expand Down

0 comments on commit 9807356

Please sign in to comment.