fix: product_category_mapping 테이블 없을 때 에러 무시
- 카테고리 조회 시 테이블 없으면 건너뛰도록 try-except 추가
This commit is contained in:
parent
4691d65c14
commit
94a8df6653
@ -1324,9 +1324,10 @@ def admin_user_detail(user_id):
|
|||||||
for item in items_raw:
|
for item in items_raw:
|
||||||
barcode = item.BARCODE
|
barcode = item.BARCODE
|
||||||
|
|
||||||
# SQLite에서 제품 카테고리 조회
|
# SQLite에서 제품 카테고리 조회 (테이블 없으면 건너뜀)
|
||||||
categories = []
|
categories = []
|
||||||
if barcode:
|
if barcode:
|
||||||
|
try:
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
SELECT category_name, relevance_score
|
SELECT category_name, relevance_score
|
||||||
FROM product_category_mapping
|
FROM product_category_mapping
|
||||||
@ -1339,6 +1340,8 @@ def admin_user_detail(user_id):
|
|||||||
'name': cat_row[0],
|
'name': cat_row[0],
|
||||||
'score': cat_row[1]
|
'score': cat_row[1]
|
||||||
})
|
})
|
||||||
|
except Exception:
|
||||||
|
pass # 테이블 없으면 무시
|
||||||
|
|
||||||
items.append({
|
items.append({
|
||||||
'code': item.DrugCode,
|
'code': item.DrugCode,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user