Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Demboski committed Aug 5, 2013
1 parent 33fc6c0 commit 3dfa8f8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tastypie_mongoengine/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,7 @@ def build_schema(self):
}

def dehydrate(self, bundle, for_list=True):
if not bundle.obj or not bundle.obj.pk:
if not self.null:
raise exceptions.ApiFieldError("The document %r does not have a primary key and can not be used in a ReferencedList context." % bundle.obj)

return []
assert bundle.obj

the_m2ms = None

Expand Down

0 comments on commit 3dfa8f8

Please sign in to comment.