Skip to content

Commit

Permalink
Add _id to batch doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Jun 2, 2020
1 parent 69cc7dc commit 75f0420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dsdk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def as_insert_doc(self, model: Optional[Model]) -> Dict[str, Any]:
doc: Optional[Dict[str, Any]] = None
if model is not None:
doc = model.as_doc()
return {"model": doc, "record": self.record.as_doc()}
return {"_id": self.key, "model": doc, "record": self.record.as_doc()}

def as_update_doc(self) -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""As update doc."""
Expand Down

0 comments on commit 75f0420

Please sign in to comment.