mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-20 09:20:46 +02:00
Minor PEP8 changes
This commit is contained in:
parent
fabac887ef
commit
9cb32f83ca
@ -382,7 +382,7 @@ def update_ticket(request, ticket_id, public=False):
|
|||||||
(reverse('helpdesk:login'), request.path))
|
(reverse('helpdesk:login'), request.path))
|
||||||
|
|
||||||
ticket = get_object_or_404(Ticket, id=ticket_id)
|
ticket = get_object_or_404(Ticket, id=ticket_id)
|
||||||
|
|
||||||
date_re = re.compile(
|
date_re = re.compile(
|
||||||
r'(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<year>\d{4})$'
|
r'(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<year>\d{4})$'
|
||||||
)
|
)
|
||||||
@ -396,13 +396,13 @@ def update_ticket(request, ticket_id, public=False):
|
|||||||
due_date_year = int(request.POST.get('due_date_year', 0))
|
due_date_year = int(request.POST.get('due_date_year', 0))
|
||||||
due_date_month = int(request.POST.get('due_date_month', 0))
|
due_date_month = int(request.POST.get('due_date_month', 0))
|
||||||
due_date_day = int(request.POST.get('due_date_day', 0))
|
due_date_day = int(request.POST.get('due_date_day', 0))
|
||||||
#NOTE: jQuery's default for dates is mm/dd/yy
|
# NOTE: jQuery's default for dates is mm/dd/yy
|
||||||
# very US-centric but for now that's the only format supported
|
# very US-centric but for now that's the only format supported
|
||||||
# until we clean up code to internationalize a little more
|
# until we clean up code to internationalize a little more
|
||||||
due_date = request.POST.get('due_date', None)
|
due_date = request.POST.get('due_date', None)
|
||||||
|
|
||||||
if due_date is not None:
|
if due_date is not None:
|
||||||
# based on Django code to parse dates:
|
# based on Django code to parse dates:
|
||||||
# https://docs.djangoproject.com/en/2.0/_modules/django/utils/dateparse/
|
# https://docs.djangoproject.com/en/2.0/_modules/django/utils/dateparse/
|
||||||
match = date_re.match(due_date)
|
match = date_re.match(due_date)
|
||||||
if match:
|
if match:
|
||||||
|
Loading…
Reference in New Issue
Block a user