From dbbfaea9136dda8b4475c1698de877189cfd2a8b Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Mon, 4 Nov 2019 15:31:11 +0100
Subject: [PATCH] Remove get_field_kwargs() in ImageFieldBlock. We do not need
 this when using Django 2.1+.

---
 opentech/apply/stream_forms/blocks.py | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/opentech/apply/stream_forms/blocks.py b/opentech/apply/stream_forms/blocks.py
index 86fcf0b4b..d8a808422 100644
--- a/opentech/apply/stream_forms/blocks.py
+++ b/opentech/apply/stream_forms/blocks.py
@@ -387,13 +387,6 @@ class ImageFieldBlock(UploadableMediaBlock):
         label = _('Image field')
         icon = 'image'
 
-    def get_field_kwargs(self, struct_value):
-        kwargs = super().get_field_kwargs(struct_value)
-        # We do not need this when we are on Django 2.1
-        # https://docs.djangoproject.com/en/2.1/releases/2.1/#forms
-        kwargs['widget'] = self.get_widget(struct_value)(attrs={'accept': 'image/*'})
-        return kwargs
-
 
 class FileFieldBlock(UploadableMediaBlock):
     """This doesn't know how to save the uploaded files
-- 
GitLab