0.5.12 get_tree_arts fix

This commit is contained in:
SDE
2024-07-15 15:25:44 +03:00
parent 9fa8403e95
commit 7d971710b5
3 changed files with 10 additions and 5 deletions

View File

@@ -14,10 +14,12 @@ from collections import OrderedDict
def get_tree_arts(art, arts, sel_arts_ids):
docs_tree = OrderedDict()
docs_tree.update({
art_item.name: {
art_item.id: {
'url': art_item.url,
'id': art_item.id,
'name': art_item.name,
# 'id': art_item.id,
'children': get_tree_arts(art_item, arts, sel_arts_ids),
'active': art_item.id in sel_arts_ids
} for art_item in arts.filter(parent=art)