diff --git a/appa/tasks.py b/appa/tasks.py index cce7970..a96e47e 100644 --- a/appa/tasks.py +++ b/appa/tasks.py @@ -50,8 +50,8 @@ def update_call_requests_task(self): for medical_speciality in CallMedicalSpeciality.objects.all()} call_services = { - 'A29\.004.+': 'На узи', - 'A29\.011.+': 'На эндоскопию' + r'A29\.004.+': 'На узи', + r'A29\.011.+': 'На эндоскопию' } now = datetime.datetime.now().astimezone(pytz.timezone('Asia/Vladivostok')) @@ -72,7 +72,7 @@ def update_call_requests_task(self): for booking_service in booking['services']: service_code = booking_service['service']['code'] for regex, bot_talking in call_services.items(): - if re.match(regex, service_code): + if re.match(regex, service_code.strip()): service_name = bot_talking break