From 75f0420f1e021f1a1467c6f2ce0fb9ed60b6656e Mon Sep 17 00:00:00 2001 From: Jason Lubken Date: Tue, 2 Jun 2020 14:10:42 -0400 Subject: [PATCH] Add _id to batch doc --- src/dsdk/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsdk/service.py b/src/dsdk/service.py index a5e14ba..22053f8 100644 --- a/src/dsdk/service.py +++ b/src/dsdk/service.py @@ -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."""