From 4f953d695d72a855aa8e66321042c038457b6021 Mon Sep 17 00:00:00 2001 From: sandeepsajan0 <sandeepsajan0@gmail.com> Date: Thu, 12 May 2022 17:25:08 +0530 Subject: [PATCH] Use Request's workflow message template for remaining workflows(other than request, concept and proposal) --- hypha/apply/determinations/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hypha/apply/determinations/models.py b/hypha/apply/determinations/models.py index c309b3e9c..9807ac669 100644 --- a/hypha/apply/determinations/models.py +++ b/hypha/apply/determinations/models.py @@ -15,6 +15,7 @@ from wagtail.contrib.settings.models import BaseSetting, register_setting from wagtail.core.fields import RichTextField, StreamField from hypha.apply.funds.models.mixins import AccessFormData +from hypha.apply.funds.workflow import Concept, ConceptProposal, Request from .blocks import ( DeterminationBlock, @@ -198,7 +199,11 @@ class DeterminationMessageSettings(BaseSetting): def get_for_stage(self, stage_name): message_templates = {} - prefix = f"{stage_name.lower()}_" + if stage_name in [Request.name, Concept.name, ConceptProposal.name]: + prefix = f"{stage_name.lower()}_" + else: + # Use Request's message templates for remaining workflows + prefix = "request_" for field in self._meta.get_fields(): if prefix in field.name: -- GitLab