horizon/openstack_dashboard/templatetags
Yosef Hoffman da2e93578f Fix AttributeError in context_selection.py
When create a service with region = None,

File "/openstack_dashboard/templatetags/context_selection.py", line 100,
in <lambda>
AttributeError: 'NoneType' object has no attribute 'lower'

The problem code:

    sorted(request.user.available_services_regions,
           key=lambda x: x.lower())

To fix this, if region is NoneType, use '' as key to put it first in the
list.

Change-Id: Ide8eaeeee634bf1933ef263d3b27204c7711d167
Closes-Bug: #1581667
2016-08-17 04:00:38 -04:00
..
__init__.py Context selection for project and region 2014-09-02 09:38:27 -06:00
context_selection.py Fix AttributeError in context_selection.py 2016-08-17 04:00:38 -04:00
themes.py Dynamic Themes 2016-02-25 09:49:43 -08:00