CATEGORY ID IS NONE??????
This commit is contained in:
1 parent
d07f66ca57
commit
30b4b26c9e
1 file changed
+11
-1
+11
-1
@@ -167,11 +167,21 @@ async def get_item_by_variation_id(variation_id: str) -> dict:
|
||||
print(
|
||||
f"[@DEBUG] Found parent item: {obj['id']} on page {page_count}"
|
||||
)
|
||||
|
||||
# Since we searched by category, we know it's in LEGO_CAT_ID
|
||||
# But also try to get from item_data as fallback
|
||||
category_id = item_data.get("category_id") or LEGO_CAT_ID
|
||||
|
||||
print(
|
||||
f"[@DEBUG] Item category_id from data: {item_data.get('category_id')}"
|
||||
)
|
||||
print(f"[@DEBUG] Using category_id: {category_id}")
|
||||
|
||||
return {
|
||||
"id": obj["id"],
|
||||
"name": item_data.get("name", ""),
|
||||
"description": item_data.get("description", ""),
|
||||
"category_id": item_data.get("category_id"),
|
||||
"category_id": category_id,
|
||||
"variations": variations,
|
||||
"updated_at": obj.get("updated_at"),
|
||||
"version": obj.get("version"),
|
||||
|
||||
Reference in new issue
Block a user