wcs: only request formdef popularity when ordering by popularity (#21167)
This commit is contained in:
parent
461ce4337c
commit
071946c627
|
@ -371,7 +371,10 @@ class WcsFormsOfCategoryCell(WcsCommonCategoryCell, WcsBlurpMixin):
|
|||
|
||||
@property
|
||||
def api_url(self):
|
||||
return '/api/categories/%s/formdefs/' % self.category_reference.split(':')[1]
|
||||
api_url = '/api/categories/%s/formdefs/' % self.category_reference.split(':')[1]
|
||||
if self.ordering == 'popularity':
|
||||
api_url += '?include-count=on'
|
||||
return api_url
|
||||
|
||||
def is_relevant(self, context):
|
||||
return bool(self.category_reference)
|
||||
|
|
Loading…
Reference in New Issue