Spaces:
Sleeping
Sleeping
fruitpicker01
commited on
Commit
•
75c3a97
1
Parent(s):
c8c0f91
Update app.py
Browse files
app.py
CHANGED
@@ -472,7 +472,7 @@ def notify_failed_checks(checks):
|
|
472 |
|
473 |
# Находим первую не пройденную проверку
|
474 |
for check_name, passed in checks.items():
|
475 |
-
if passed
|
476 |
failed_check = translation.get(check_name, check_name)
|
477 |
gr.Warning(f"Сообщение не прошло следующую проверку: {failed_check}")
|
478 |
break # Останавливаемся на первой ошибке
|
@@ -1423,6 +1423,7 @@ def safe_check(func, *args):
|
|
1423 |
return func(*args)
|
1424 |
except Exception as e:
|
1425 |
# Optionally, you can log the exception here if needed
|
|
|
1426 |
return None # Indicate that the check could not be performed
|
1427 |
|
1428 |
def perform_checks(message, description, key_message):
|
|
|
472 |
|
473 |
# Находим первую не пройденную проверку
|
474 |
for check_name, passed in checks.items():
|
475 |
+
if not passed:
|
476 |
failed_check = translation.get(check_name, check_name)
|
477 |
gr.Warning(f"Сообщение не прошло следующую проверку: {failed_check}")
|
478 |
break # Останавливаемся на первой ошибке
|
|
|
1423 |
return func(*args)
|
1424 |
except Exception as e:
|
1425 |
# Optionally, you can log the exception here if needed
|
1426 |
+
print(f"Ошибка в {func.__name__}: {e}")
|
1427 |
return None # Indicate that the check could not be performed
|
1428 |
|
1429 |
def perform_checks(message, description, key_message):
|