Browse Source

support save

Xiaopeng Zhang 6 tháng trước cách đây
mục cha
commit
094841b8bb
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      subdir/db.py

+ 2 - 2
subdir/db.py

@@ -706,8 +706,8 @@ async def save(client, data):
     db = client["baojia"]
     collection = db["qdxm"]
     for entry in data:
-        entry["__children"] = entry["children"]
-        del entry["children"]
+        entry["__children"] = entry["_children"]
+        del entry["_children"]
         await collection.replace_one({"biao_id": entry["biao_id"], "Dwgcbh": entry["Dwgcbh"], "bt": entry["bt"], "清单编码": entry["清单编码"]}, entry)
 
     return {"result": "ok"}