rossp/django-helpdesk — Issue #117: Take a ticket do not work anymore
Author: bclermont
Created: 2012-02-06 18:45:26+00:00
State: open

the thing is there is no due_date_* in the POST.

My ugly fix is this:

```
diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py
index d16ed3d..c7ddc9f 100644
--- a/helpdesk/views/staff.py
+++ b/helpdesk/views/staff.py
@@ -250,10 +250,13 @@ 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')))
+ try:
+ due_date = datetime(
+ int(request.POST.get('due_date_year')),
+ int(request.POST.get('due_date_month')),
+ int(request.POST.get('due_date_day')))
+ except TypeError:
+ due_date = ticket.due_date
tags = request.POST.get('tags', '')

# We need to allow the 'ticket' and 'queue' contexts to be applied to the
```