Commit 4ae31dca authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Merge branch 'hide-empty-version-sandbox-panel' into 'django'

Fix existing 'versions' not empty in the sandbox panel

See merge request !132
parents fab31da2 34a50b0f
Pipeline #40709 failed with stage
in 1 minute and 17 seconds
...@@ -347,8 +347,8 @@ class WebappSandboxPanel(LoginRequiredMixin, TemplateView): ...@@ -347,8 +347,8 @@ class WebappSandboxPanel(LoginRequiredMixin, TemplateView):
for state in (WebappVersion.READY, WebappVersion.COMMITTED): for state in (WebappVersion.READY, WebappVersion.COMMITTED):
versions.update((v.number, v) for v in WebappVersion.objects.filter( versions.update((v.number, v) for v in WebappVersion.objects.filter(
webapp=context["webapp"], state=state)) webapp=context["webapp"], state=state))
context['versions'] = reversed( context['versions'] = natsort.versorted(versions.values(), key=lambda v: v.number)
natsort.versorted(versions.values(), key=lambda v: v.number)) context['versions'].reverse()
return context return context
def post(self, request, *, docker_name): def post(self, request, *, docker_name):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment