mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-02-16 10:19:17 +01:00
Handle "no label" for status id case (shouldn't happen)
This commit is contained in:
parent
c7a9a1ab54
commit
40ef247844
@ -719,14 +719,14 @@ class Ticket(models.Model):
|
|||||||
if status_id_list:
|
if status_id_list:
|
||||||
# keep defined statuses in order and add labels for display
|
# keep defined statuses in order and add labels for display
|
||||||
status_dict = dict(helpdesk_settings.TICKET_STATUS_CHOICES)
|
status_dict = dict(helpdesk_settings.TICKET_STATUS_CHOICES)
|
||||||
new_statuses = [(status_id, status_dict.get(status_id, 1))
|
new_statuses = [(status_id, status_dict.get(status_id, _('No label')))
|
||||||
for status_id in status_id_list]
|
for status_id in status_id_list]
|
||||||
else:
|
else:
|
||||||
# defaults to all choices if status was not mapped
|
# defaults to all choices if status was not mapped
|
||||||
new_statuses = helpdesk_settings.TICKET_STATUS_CHOICES
|
new_statuses = helpdesk_settings.TICKET_STATUS_CHOICES
|
||||||
return new_statuses
|
return new_statuses
|
||||||
get_allowed_status_flow = property(_get_allowed_status_flow)
|
get_allowed_status_flow = property(_get_allowed_status_flow)
|
||||||
|
|
||||||
def _get_ticket_url(self):
|
def _get_ticket_url(self):
|
||||||
"""
|
"""
|
||||||
Returns a publicly-viewable URL for this ticket, used when giving
|
Returns a publicly-viewable URL for this ticket, used when giving
|
||||||
|
Loading…
Reference in New Issue
Block a user