diff --git "a/app.py" "b/app.py" --- "a/app.py" +++ "b/app.py" @@ -27,7 +27,7 @@ def load_data(): data = json.load(file) logging.info("Данные успешно загружены из JSON") if not isinstance(data, dict) or 'products' not in data or 'categories' not in data: - return {'products': [], 'categories': []} # Corrected: return empty dict with lists + return {'products': [], 'categories': []} return data except FileNotFoundError: logging.warning("Локальный файл базы данных не найден после скачивания.") @@ -94,7 +94,6 @@ def periodic_backup(): def catalog(): data = load_data() products = data['products'] - # categories = data['categories'] Removed categories from main page catalog_html = ''' @@ -102,12 +101,11 @@ def catalog():
-
+