Skip to content

Commit

Permalink
temporary workaround for MongoEngine#1135
Browse files Browse the repository at this point in the history
  • Loading branch information
alon committed Oct 27, 2015
1 parent 61f94dc commit 49123d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongoengine/queryset/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def delete(self, write_concern=None, _from_doc_delete=False, cascade_refs=None):
cascade_refs = set() if cascade_refs is None else cascade_refs
for ref in queryset:
cascade_refs.add(ref.id)
ref_q = document_cls.objects(**{field_name + '__in': self, 'id__nin': cascade_refs})
ref_q = document_cls.objects(**{field_name + '__in': self})
ref_q_count = ref_q.count()
if ref_q_count > 0:
ref_q.delete(write_concern=write_concern, cascade_refs=cascade_refs)
Expand Down

0 comments on commit 49123d1

Please sign in to comment.