1. Daniel Poelzleithner
  2. poelzi-piston-fixes


Jesper Nøhr  committed dc0ee00

actually, I'm sorry, that's kind of retarded, lets refactor that

  • Participants
  • Parent commits c55ba37
  • Branches default

Comments (0)

Files changed (1)

File piston/resource.py

View file
             emitter, ct = Emitter.get(em_format)
             fields = handler.fields
-            if hasattr(handler, 'list_fields') and (isinstance(result, list) or
-                                                    isinstance(result, QuerySet)):
+            if hasattr(handler, 'list_fields') and isinstance(result, (list, tuple, QuerySet)):
                 fields = handler.list_fields
         except ValueError:
             result = rc.BAD_REQUEST