diff --git a/app/models.py b/app/models.py index c7a0eb0d28..dbe2174e27 100644 --- a/app/models.py +++ b/app/models.py @@ -1218,10 +1218,10 @@ def get_link(self): @property def template_process_type(self): - if self.template_type == SMS_TYPE and self.template_categories.sms_process_type: - return self.template_categories.sms_process_type - elif self.template_type == EMAIL_TYPE and self.template_categories.email_process_type: - return self.template_categories.email_process_type + if self.template_type == SMS_TYPE: + return self.process_type if self.process_type else self.template_categories.sms_process_type + elif self.template_type == EMAIL_TYPE: + return self.process_type if self.process_type else self.template_categories.email_process_type return self.process_type @classmethod