fix: restore is_city_ok check and manager_email guard
This commit is contained in:
+2
-1
@@ -892,7 +892,6 @@ def process_ticket_logic(req_id):
|
|||||||
if "*" in allowed_subcats or subcat_name in allowed_subcats:
|
if "*" in allowed_subcats or subcat_name in allowed_subcats:
|
||||||
is_cat_ok = True
|
is_cat_ok = True
|
||||||
continue
|
continue
|
||||||
t_log(" ⏭ Пропуск: пользователь в исключённом отделе.")
|
|
||||||
# Проверка: отдел пользователя в списке исключений
|
# Проверка: отдел пользователя в списке исключений
|
||||||
is_excluded = False
|
is_excluded = False
|
||||||
if user_department and APPROVAL_EXCLUDED_DEPARTMENTS:
|
if user_department and APPROVAL_EXCLUDED_DEPARTMENTS:
|
||||||
@@ -905,6 +904,8 @@ def process_ticket_logic(req_id):
|
|||||||
t_log(" ⏭ Пропуск: пользователь в исключённом отделе.")
|
t_log(" ⏭ Пропуск: пользователь в исключённом отделе.")
|
||||||
continue
|
continue
|
||||||
t_log(f"✔ Условия совпали. Запуск процесса согласования для {manager_email}...")
|
t_log(f"✔ Условия совпали. Запуск процесса согласования для {manager_email}...")
|
||||||
|
if is_city_ok and (is_group_ok or is_cat_ok):
|
||||||
|
if manager_email:
|
||||||
ai_was_used = True
|
ai_was_used = True
|
||||||
|
|
||||||
share_success, share_log = share_ticket_for_approval(req_id, manager_email)
|
share_success, share_log = share_ticket_for_approval(req_id, manager_email)
|
||||||
|
|||||||
Reference in New Issue
Block a user