wcs: be sure to reset context['more_forms'] when rendering cell (#13390)

This commit is contained in:
Frédéric Péters 2016-10-03 16:30:47 +02:00
parent 760c7a2487
commit f7678c42d8
1 changed files with 1 additions and 0 deletions

View File

@ -326,6 +326,7 @@ class WcsFormsOfCategoryCell(WcsCommonCategoryCell, WcsBlurpMixin):
# default sort is alphabetical, it's always done as this will serve as
# secondary sort key (thanks to Python stable sort)
context['forms'] = sorted(context['forms'], key=lambda x: x.get('title'))
context['more_forms'] = []
if self.ordering == 'popularity':
context['forms'] = sorted(context['forms'], key=lambda x: x.get('count'), reverse=True)