From a2bde750541f2ef436ceedee5d51a3959546d3e3 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Tue, 23 Jan 2018 15:23:30 +0000
Subject: [PATCH] Ensure that the field is required on the form

---
 opentech/apply/funds/blocks.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/opentech/apply/funds/blocks.py b/opentech/apply/funds/blocks.py
index 8b7c9a71e..24e511c84 100644
--- a/opentech/apply/funds/blocks.py
+++ b/opentech/apply/funds/blocks.py
@@ -91,6 +91,11 @@ class MustIncludeFieldBlock(FormFieldBlock):
         child_blocks = [('info', MustIncludeStatic(label=info_name, description=self.description))]
         super().__init__(child_blocks, *args, **kwargs)
 
+    def get_field_kwargs(self, struct_value):
+        kwargs = super().get_field_kwargs(struct_value)
+        kwargs['required'] = True
+        return kwargs
+
 
 class TitleBlock(MustIncludeFieldBlock):
     name = 'title'
-- 
GitLab