mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-02-24 22:21:11 +01:00
fix ticket update with no due date set
This commit is contained in:
parent
e8ee39ddaa
commit
1363ba3ce1
@ -250,17 +250,14 @@ def update_ticket(request, ticket_id, public=False):
|
|||||||
public = request.POST.get('public', False)
|
public = request.POST.get('public', False)
|
||||||
owner = int(request.POST.get('owner', None))
|
owner = int(request.POST.get('owner', None))
|
||||||
priority = int(request.POST.get('priority', ticket.priority))
|
priority = int(request.POST.get('priority', ticket.priority))
|
||||||
due_date_year = request.POST.get('due_date_year', None)
|
due_date_year = int(request.POST.get('due_date_year', 0))
|
||||||
due_date_month = request.POST.get('due_date_month', None)
|
due_date_month = int(request.POST.get('due_date_month', 0))
|
||||||
due_date_day = request.POST.get('due_date_day', None)
|
due_date_day = int(request.POST.get('due_date_day', 0))
|
||||||
|
|
||||||
if not (due_date_year and due_date_month and due_date_day):
|
if not (due_date_year and due_date_month and due_date_day):
|
||||||
due_date = ticket.due_date
|
due_date = ticket.due_date
|
||||||
else:
|
else:
|
||||||
due_date = datetime(
|
due_date = datetime(due_date_year, due_date_month, due_date_day)
|
||||||
int(due_date_year),
|
|
||||||
int(due_date_month),
|
|
||||||
int(due_date_day))
|
|
||||||
tags = request.POST.get('tags', '')
|
tags = request.POST.get('tags', '')
|
||||||
|
|
||||||
# We need to allow the 'ticket' and 'queue' contexts to be applied to the
|
# We need to allow the 'ticket' and 'queue' contexts to be applied to the
|
||||||
|
Loading…
Reference in New Issue
Block a user