mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Fixes #122 - avoid exception when taking ticket.
This commit is contained in:
parent
b970f12799
commit
4fb9ab0617
@ -250,10 +250,17 @@ def update_ticket(request, ticket_id, public=False):
|
||||
public = request.POST.get('public', False)
|
||||
owner = int(request.POST.get('owner', None))
|
||||
priority = int(request.POST.get('priority', ticket.priority))
|
||||
due_date = datetime(
|
||||
int(request.POST.get('due_date_year')),
|
||||
int(request.POST.get('due_date_month')),
|
||||
int(request.POST.get('due_date_day')))
|
||||
due_date_year = request.POST.get('due_date_year', None)
|
||||
due_date_month = request.POST.get('due_date_month', None)
|
||||
due_date_day = request.POST.get('due_date_day', None)
|
||||
|
||||
if not (due_date_year and due_date_month and due_date_day):
|
||||
due_date = ticket.due_date
|
||||
else:
|
||||
due_date = datetime(
|
||||
int(due_date_year),
|
||||
int(due_date_month),
|
||||
int(due_date_day))
|
||||
tags = request.POST.get('tags', '')
|
||||
|
||||
# We need to allow the 'ticket' and 'queue' contexts to be applied to the
|
||||
|
Loading…
Reference in New Issue
Block a user