bring back plan natural sorting

This commit is contained in:
Tobias Brunner 2025-06-20 16:04:27 +02:00
parent 95e3449015
commit e9e8d24685
No known key found for this signature in database

View file

@ -144,6 +144,15 @@ def pricelist(request):
.prefetch_related("prices")
.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)
appcat_prices_qs = (