From 007e5bc63a8aad6bb66d771fc93a01688de7ac54 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Wed, 7 Feb 2024 14:45:34 +0200 Subject: [PATCH] debug: Add debug data DONOTMERGE Signed-off-by: Denys Fedoryshchenko --- api/db.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/db.py b/api/db.py index 1d088417..055da0c2 100644 --- a/api/db.py +++ b/api/db.py @@ -164,11 +164,16 @@ async def create(self, obj): async def _create_recursively(self, hierarchy: Hierarchy, parent: Node, cls, col): + # print out Node object and its full dict + node = hierarchy.node + node_debug = node.dict(by_alias=True) + print(f"_create_recursively node: {node_debug}") obj = parse_node_obj(hierarchy.node) + print(f"_create_recursively full dict: {obj.dict(by_alias=True)}") if parent: obj.parent = parent.id if obj.id: - obj.update() + obj.update() res = await col.replace_one( {'_id': ObjectId(obj.id)}, obj.dict(by_alias=True) )