From 3413fe48d02695da7614a9ffe8b5f86199098a2c Mon Sep 17 00:00:00 2001
From: sandeepsajan0 <sandeepsajan0@gmail.com>
Date: Tue, 25 May 2021 12:50:05 +0530
Subject: [PATCH] fix: Add anyascii to remove unidecode as per wagtail-2.11
 documentation

---
 hypha/apply/stream_forms/blocks.py | 4 ++--
 requirements.txt                   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hypha/apply/stream_forms/blocks.py b/hypha/apply/stream_forms/blocks.py
index e6b07d45c..33e98e74b 100644
--- a/hypha/apply/stream_forms/blocks.py
+++ b/hypha/apply/stream_forms/blocks.py
@@ -11,7 +11,7 @@ from django.utils.html import conditional_escape
 from django.utils.text import slugify
 from django.utils.translation import gettext_lazy as _
 from django_bleach.templatetags.bleach_tags import bleach_value
-from unidecode import unidecode
+from anyascii import anyascii
 from wagtail.core.blocks import (
     BooleanBlock,
     CharBlock,
@@ -44,7 +44,7 @@ class FormFieldBlock(StructBlock):
         template = 'stream_forms/render_field.html'
 
     def get_slug(self, struct_value):
-        return force_str(slugify(unidecode(struct_value['field_label'])))
+        return force_str(slugify(anyascii(struct_value['field_label'])))
 
     def get_field_class(self, struct_value):
         return self.field_class
diff --git a/requirements.txt b/requirements.txt
index 2ed5bc5cd..4f439612a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -46,3 +46,4 @@ wagtail-cache==1.0.1
 wagtail-purge==0.1
 wagtail==2.13
 whitenoise==5.2.0
+anyascii==0.2.0
-- 
GitLab