From 19e410c84362c51e7de7b729972ac954c90b65f7 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Fri, 5 Apr 2024 21:57:17 +0200 Subject: [PATCH] fix #128: Boolean field shows label twice --- formset/renderers/default.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formset/renderers/default.py b/formset/renderers/default.py index c66be919..e1be34f5 100644 --- a/formset/renderers/default.py +++ b/formset/renderers/default.py @@ -60,7 +60,7 @@ def _amend_label(self, context, hide_checkbox_label=False): if hide_checkbox_label and widget_type == 'checkbox': # `` is rendered by `{{ field }}`, so remove it to # prevent double rendering. - + context.pop('label', None) context['attrs'].pop('for', None) context['use_tag'] = bool(self.control_css_classes) if widget_type == 'button' and 'label' in context: