From 3e2dac817613a73237a5e5b5d9220fdb33554c9e Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Mon, 2 Dec 2024 15:29:23 +0100 Subject: [PATCH] Changelog + lower log lever for AppIO api connector --- CHANGES.rst | 5 +++-- src/redturtle/prenotazioni/io_tools/api.py | 12 +++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f687178e..6a469772 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,9 +5,10 @@ Changelog 2.8.4 (unreleased) ------------------ -- Fix first available day result. +- Change the date validation order, if day is vacation, it is not possibile to book. + [folix-01] +- Lower log level for AppIO exceptions [folix-01] - 2.8.3 (2024-11-28) ------------------ diff --git a/src/redturtle/prenotazioni/io_tools/api.py b/src/redturtle/prenotazioni/io_tools/api.py index 343ee51c..21228154 100644 --- a/src/redturtle/prenotazioni/io_tools/api.py +++ b/src/redturtle/prenotazioni/io_tools/api.py @@ -108,17 +108,17 @@ def send_message( """ # 0. validazione argomenti if len(subject) < 10 or len(subject) > 120: - logger.error( + logger.warning( "la lunghezza dell'oggetto del messaggio deve stare tra i 10 e i 120 caratteri" ) return None if len(body) < 80 or len(body) > 10000: - logger.error( + logger.warning( "la lunghezza del contenuto del messaggio deve stare tra i 80 e i 10.000 caratteri" ) return None if due_date and not isinstance(due_date, datetime): - logger.error( + logger.warning( "il campo con la data, se valorizzato, deve essere di tipo datetime" ) return None @@ -209,9 +209,7 @@ def get_profile(self, fiscal_code): ) except Exception: - logger.exception( - "profile for user %s not found (generic error)", fiscal_code - ) + logger.warning("profile for user %s not found (generic error)", fiscal_code) return None @@ -237,7 +235,7 @@ def is_service_activated(self, fiscal_code): ) except Exception: - logger.exception( + logger.warning( "subsctiprion not found for user %s (generic error)", fiscal_code, )