Skip to content
Snippets Groups Projects
Commit 4f953d69 authored by sandeepsajan0's avatar sandeepsajan0
Browse files

Use Request's workflow message template for remaining workflows(other than...

Use Request's workflow message template for remaining workflows(other than request, concept and proposal)
parent 53a00c40
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ from wagtail.contrib.settings.models import BaseSetting, register_setting ...@@ -15,6 +15,7 @@ from wagtail.contrib.settings.models import BaseSetting, register_setting
from wagtail.core.fields import RichTextField, StreamField from wagtail.core.fields import RichTextField, StreamField
from hypha.apply.funds.models.mixins import AccessFormData from hypha.apply.funds.models.mixins import AccessFormData
from hypha.apply.funds.workflow import Concept, ConceptProposal, Request
from .blocks import ( from .blocks import (
DeterminationBlock, DeterminationBlock,
...@@ -198,7 +199,11 @@ class DeterminationMessageSettings(BaseSetting): ...@@ -198,7 +199,11 @@ class DeterminationMessageSettings(BaseSetting):
def get_for_stage(self, stage_name): def get_for_stage(self, stage_name):
message_templates = {} 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(): for field in self._meta.get_fields():
if prefix in field.name: if prefix in field.name:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment