1. inoa
  2. django-inoa

Commits

João Pedro Francese  committed cd35bff

Fixing AjaxView when the view returns a 2-elements list.

  • Participants
  • Parent commits badd3cd
  • Branches default

Comments (0)

Files changed (1)

File inoa/views/ajaxview.py

View file
  • Ignore whitespace
         if isinstance(data, HttpResponse) or (isinstance(data, type) and issubclass(data, HttpResponse)):
             status_code = data.status_code
             ctx = {}
-        elif (isinstance(data, tuple) or isinstance(data, list)) and len(data) == 2:
+        elif isinstance(data, tuple) and len(data) == 2:
             status_code = getattr(data[0], 'status_code', data[0])
             ctx = data[1] or {}
         else: