From 105a8c14a859309d558ae31383d495763b4d63f9 Mon Sep 17 00:00:00 2001
From: Shrikrishna Singh <krishnasingh.ss30@gmail.com>
Date: Wed, 10 Jun 2020 14:37:25 +0530
Subject: [PATCH] Only Check ApplicationMustIncludeFieldBlock instead of
 individual blocks

---
 hypha/apply/stream_forms/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hypha/apply/stream_forms/models.py b/hypha/apply/stream_forms/models.py
index 333c7b6a9..ad222f3ea 100644
--- a/hypha/apply/stream_forms/models.py
+++ b/hypha/apply/stream_forms/models.py
@@ -3,7 +3,7 @@ from collections import OrderedDict
 
 from wagtail.contrib.forms.models import AbstractForm
 
-from hypha.apply.funds.blocks import EmailBlock, FullNameBlock, TitleBlock
+from hypha.apply.funds.blocks import ApplicationMustIncludeFieldBlock
 
 from .blocks import (
     FormFieldBlock,
@@ -54,7 +54,7 @@ class BaseStreamForm:
             struct_value = struct_child.value
             if isinstance(block, FormFieldBlock):
                 field_from_block = block.get_field(struct_value)
-                if draft and not isinstance(block, (EmailBlock, FullNameBlock, TitleBlock)):
+                if draft and not issubclass(block.__class__, ApplicationMustIncludeFieldBlock):
                     field_from_block.required = False
                 field_from_block.help_link = struct_value.get('help_link')
                 field_from_block.group_number = group_counter if is_in_group else 1
-- 
GitLab