Skip to content

Commit

Permalink
Fix #1351 - exception in displayable_links_js
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHill committed Jul 14, 2015
1 parent 7c516f4 commit 6f6fb4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mezzanine/core/views.py
Expand Up @@ -194,7 +194,8 @@ def displayable_links_js(request):
verbose_name = _("Page") if page else obj._meta.verbose_name
title = "%s: %s" % (verbose_name, title)
links.append((not page and real, {"title": str(title), "value": url}))
return HttpResponse(dumps([link[1] for link in sorted(links)]))
sorted_links = sorted(links, key=lambda link: (link[0], link[1]['value']))
return HttpResponse(dumps([link[1] for link in sorted_links]))


@requires_csrf_token
Expand Down

0 comments on commit 6f6fb4a

Please sign in to comment.