diff --git a/ayugespidertools/common/mongodbpipe.py b/ayugespidertools/common/mongodbpipe.py index 76bfe98..75440a2 100644 --- a/ayugespidertools/common/mongodbpipe.py +++ b/ayugespidertools/common/mongodbpipe.py @@ -83,7 +83,7 @@ def _default_storage( if not item_dict.get("_mongo_update_rule"): db[collection_name].insert_one(insert_data) else: - db[collection_name].update_many( + db[collection_name].update_one( item_dict["_mongo_update_rule"], {"$set": insert_data}, True ) @@ -166,7 +166,7 @@ async def _data_storage_logic( # type: ignore[override] if not item_dict.get("_mongo_update_rule"): await db[collection_name].insert_one(insert_data) else: - await db[collection_name].update_many( + await db[collection_name].update_one( item_dict["_mongo_update_rule"], {"$set": insert_data}, True )