Skip to content

Commit

Permalink
Update fields.py
Browse files Browse the repository at this point in the history
Handle an empty request.path value
  • Loading branch information
EyePulp committed May 10, 2013
1 parent d5dc748 commit 07038bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tastypie/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def should_full_dehydrate(self, bundle):
should_dehydrate_full_resource = False
if self.full:

if not bundle.request: # default to True if no bundle request is available
if not bundle.request or not bundle.request.path: # default to True if no bundle request is available
should_dehydrate_full_resource = True
else:
is_details_view = resolve(bundle.request.path).url_name == "api_dispatch_detail"
Expand Down

0 comments on commit 07038bc

Please sign in to comment.