The get_dashboards() method used sorted(<values>) to sort the
dashboards that have been registered manually. This breaks if
two or more are registered that way because the Dashboard class
doesn't define a natural ordering. The fix is to sort using
the Dashboard name as the sort key. (Unit test included.)
This problem doesn't occur in python 2.7.
P.S.
It turns out that AdminPanel in horizon/test/unit/test_base.py is not
used during the review. It is dropped too as it is a simple change.
Reviewed: https:/ /review. opendev. org/670446 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=a95398d012f fdd82e7d4a5e591 dfd88e68f44f24
Committed: https:/
Submitter: Zuul
Branch: master
commit a95398d012ffdd8 2e7d4a5e591dfd8 8e68f44f24
Author: Stephen Crawley <email address hidden>
Date: Thu Jul 11 10:17:24 2019 +1000
Manually registering 2 Dashboards breaks get_dashboards() (python3)
The get_dashboards() method used sorted(<values>) to sort the
dashboards that have been registered manually. This breaks if
two or more are registered that way because the Dashboard class
doesn't define a natural ordering. The fix is to sort using
the Dashboard name as the sort key. (Unit test included.)
This problem doesn't occur in python 2.7.
P.S. test/unit/ test_base. py is not
It turns out that AdminPanel in horizon/
used during the review. It is dropped too as it is a simple change.
Change-Id: I6be10a92a1f43b 3e0effee8148987 c7e2c5690ff
Closes-bug: #1836295