Skip to content

Commit

Permalink
debug: Add debug data DONOTMERGE
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Feb 7, 2024
1 parent 8e6a806 commit 007e5bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check warning on line 176 in api/db.py

View workflow job for this annotation

GitHub Actions / Lint

Trailing whitespace

Check warning on line 176 in api/db.py

View workflow job for this annotation

GitHub Actions / Lint

trailing whitespace
res = await col.replace_one(
{'_id': ObjectId(obj.id)}, obj.dict(by_alias=True)
)
Expand Down

0 comments on commit 007e5bc

Please sign in to comment.