feat(reports): stabilize on-demand generation, live presence and 1C fallback
This commit is contained in:
@@ -36,7 +36,9 @@ def get_all_exceptions_from_db() -> Dict[str, List[str]]:
|
||||
"position_keywords": [],
|
||||
"include_fio": [],
|
||||
"turnstile_fio": [],
|
||||
"turnstile_departments": []
|
||||
"turnstile_departments": [],
|
||||
"fligel_fio": [], # ⭐️ Сотрудники с доступом через Флигель (DoorIndex = 23)
|
||||
"fligel_departments": [] # ⭐️ Отделы с доступом через Флигель
|
||||
}
|
||||
|
||||
with get_connection() as conn:
|
||||
@@ -56,8 +58,8 @@ def get_all_exceptions_from_db() -> Dict[str, List[str]]:
|
||||
|
||||
def add_exception_to_db(category: str, value: str, comment: str = "") -> bool:
|
||||
init_exceptions_table()
|
||||
# ФИО очищаем и приводим к нормализованному виду
|
||||
val_clean = normalize_fio(value) if category in ["fio", "include_fio", "turnstile_fio"] else value.strip()
|
||||
# Нормализуем ФИО в том числе для реестра флигеля
|
||||
val_clean = normalize_fio(value) if category in ["fio", "include_fio", "turnstile_fio", "fligel_fio"] else value.strip()
|
||||
if not val_clean:
|
||||
return False
|
||||
with get_connection() as conn:
|
||||
|
||||
Reference in New Issue
Block a user