Commits

Jesper Nøhr committed 50e9731

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

  • Participants
  • Parent commits 812ff0e

Comments (0)

Files changed (1)

piston/resource.py

             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