diff --git a/horilla_automations/models.py b/horilla_automations/models.py index 35596541b..0ed70d871 100644 --- a/horilla_automations/models.py +++ b/horilla_automations/models.py @@ -59,11 +59,11 @@ class MailAutomation(HorillaModel): blank=True, verbose_name=_trans("Also Send to"), ) - delivary_channel = models.CharField( + delivery_channel = models.CharField( default="email", max_length=50, choices=SEND_OPTIONS, - verbose_name=_trans("Choose Delivary Channel"), + verbose_name=_trans("Choose Delivery Channel"), ) template_attachments = models.ManyToManyField( HorillaMailTemplate, diff --git a/horilla_automations/signals.py b/horilla_automations/signals.py index 42c410ab9..067e68b46 100644 --- a/horilla_automations/signals.py +++ b/horilla_automations/signals.py @@ -498,17 +498,17 @@ def send_mail(request, automation, instance): f"Automation {automation.title} is triggered by {request.user.employee_get}" ) - if automation.delivary_channel != "notification": + if automation.delivery_channel != "notification": thread = threading.Thread( target=lambda: _send_mail(email), ) thread.start() - if automation.delivary_channel != "email": + if automation.delivery_channel != "email": thread = threading.Thread( target=lambda: _send_notification(plain_text), ) thread.start() logger.info( - f"Automation Triggered | {automation.get_delivary_channel_display()} | {automation}" + f"Automation Triggered | {automation.get_delivery_channel_display()} | {automation}" ) diff --git a/horilla_automations/templates/horilla_automations/load_automation.html b/horilla_automations/templates/horilla_automations/load_automation.html index 4fe62859b..f21f4a973 100644 --- a/horilla_automations/templates/horilla_automations/load_automation.html +++ b/horilla_automations/templates/horilla_automations/load_automation.html @@ -40,15 +40,15 @@ {{automation.template_body|safe}}