From 7152efee967587b5223d2ee6f55b7dec70087001 Mon Sep 17 00:00:00 2001
From: sks444 <krishnasingh.ss30@gmail.com>
Date: Mon, 26 Oct 2020 15:13:23 +0530
Subject: [PATCH] Make section text/header field as read_only

---
 hypha/apply/api/v1/stream_serializers.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hypha/apply/api/v1/stream_serializers.py b/hypha/apply/api/v1/stream_serializers.py
index a6cf1ca61..689b69655 100644
--- a/hypha/apply/api/v1/stream_serializers.py
+++ b/hypha/apply/api/v1/stream_serializers.py
@@ -109,6 +109,8 @@ class WagtailSerializer:
             del attrs['required']
 
         if isinstance(form_field, BlockFieldWrapper):
+            attrs['read_only'] = True
+            del attrs['required']
             return attrs
 
         # avoid "May not set both `read_only` and `required`"
-- 
GitLab