pedagogy: improve performances on json mode for UVListView

This commit is contained in:
Antoine Bartuccio 2019-07-10 12:26:37 +02:00
parent 49f928e754
commit d844bccb04
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -158,10 +158,9 @@ class UVListView(CanViewMixin, CanCreateUVFunctionMixin, ListView):
template_name = "pedagogy/guide.jinja"
def get(self, *args, **kwargs):
resp = super(UVListView, self).get(*args, **kwargs)
if not self.request.GET.get("json", None):
# Return normal full template response
return resp
return super(UVListView, self).get(*args, **kwargs)
# Return serialized response
return HttpResponse(