bring back plan natural sorting
This commit is contained in:
parent
95e3449015
commit
e9e8d24685
1 changed files with 9 additions and 0 deletions
|
@ -144,6 +144,15 @@ def pricelist(request):
|
||||||
.prefetch_related("prices")
|
.prefetch_related("prices")
|
||||||
.order_by("group__order", "group__name", "cloud_provider__name", "name")
|
.order_by("group__order", "group__name", "cloud_provider__name", "name")
|
||||||
)
|
)
|
||||||
|
# Restore natural sorting of compute plan names
|
||||||
|
compute_plans = sorted(
|
||||||
|
compute_plans,
|
||||||
|
key=lambda p: (
|
||||||
|
p.group.order if p.group else 999,
|
||||||
|
p.group.name if p.group else "ZZZ",
|
||||||
|
natural_sort_key(p.name),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
# Fetch all appcat price configurations (prefetch addons)
|
# Fetch all appcat price configurations (prefetch addons)
|
||||||
appcat_prices_qs = (
|
appcat_prices_qs = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue