Skip to content

Commit

Permalink
actually, I'm sorry, that's kind of retarded, lets refactor that
Browse files Browse the repository at this point in the history
  • Loading branch information
jespern committed Jul 18, 2010
1 parent 466a028 commit e644cbf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions piston/resource.py
Expand Up @@ -169,8 +169,7 @@ def __call__(self, request, *args, **kwargs):
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
Expand Down

0 comments on commit e644cbf

Please sign in to comment.