fix(): fix models for get flags
This commit is contained in:
1 parent
77ebb0e3a8
commit
81ff26fdb8
4 files changed
+64
-37
No files matched your search
@@ -70,6 +70,7 @@ def get_all_categories_with_attributes(db_name: str = 'pipe_store.db') -> List[D
|
||||
attributes.append({
|
||||
"id": filter_id,
|
||||
"name": filter_name,
|
||||
"flag": filter_key, # добавлено поле flag
|
||||
"vals": vals
|
||||
})
|
||||
|
||||
@@ -77,7 +78,7 @@ def get_all_categories_with_attributes(db_name: str = 'pipe_store.db') -> List[D
|
||||
"id": category_id,
|
||||
"name": cat_row['name'],
|
||||
"image": cat_row['image_path'] or f"/images/categories/{cat_row['name'].lower().replace(' ', '_')}.jpg",
|
||||
"atributes": attributes
|
||||
"attributes": attributes # исправлено atributes → attributes
|
||||
})
|
||||
|
||||
return categories
|
||||
|
||||
Reference in new issue
Block a user