Унификация использования конфигурации подключения к СУБД

This commit is contained in:
2024-12-06 15:12:21 +03:00
parent c1367bb47e
commit f8c79939b4
4 changed files with 27 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
from Database.sql_provider import SQLProvider
from Database.work import select_list, transaction
from Database.work import select_list
from Database.DBconnect import DBContextManager
from flask import current_app, session
@@ -41,6 +41,8 @@ def index_waybill() -> list:
cache_select = fetch_from_cache('items_cached', cache_config)(select_list)
_sql = sql_provider.get('goods.sql', {})
products = cache_select(db_config, _sql)
if products == None:
return []
return products