Translations dashboard errors on missing languages for a page

Bug #1528618 reported by David Callé
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Developer Portal
Fix Released
Medium
David Callé

Bug Description

Internal Server Error: /translations-dashboard/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/srv/devportal-app-0/code/142/translations_dashboard/views.py", line 37, in translations_dashboard
    {'cms_pages': get_pages()},
  File "/srv/devportal-app-0/code/142/translations_dashboard/views.py", line 29, in get_pages
    dashboard_data, key=lambda k: k.get('en', None))))
TypeError: can't compare datetime.datetime to NoneType

========

Pages missing the 'en' language (which are a handful of very old pages that predates the public launch of the site) need to return a valid time instead of None.

Related branches

David Callé (davidc3)
Changed in developer-ubuntu-com:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → David Callé (davidc3)
David Callé (davidc3)
Changed in developer-ubuntu-com:
status: In Progress → Fix Committed
Changed in developer-ubuntu-com:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.