소스 검색

support save

Xiaopeng Zhang 6 달 전
부모
커밋
094841b8bb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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"}