From 3b1177efde53feda9aceeb4a1db2c46af34d0959 Mon Sep 17 00:00:00 2001
From: Dan Braghis <dan.braghis@torchbox.com>
Date: Wed, 10 Jan 2018 11:57:21 +0000
Subject: [PATCH] Fix category block default label

---
 opentech/apply/categories/blocks.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/opentech/apply/categories/blocks.py b/opentech/apply/categories/blocks.py
index 8aa502e3a..ecd61dc8c 100644
--- a/opentech/apply/categories/blocks.py
+++ b/opentech/apply/categories/blocks.py
@@ -42,9 +42,11 @@ class CategoryQuestionBlock(FormFieldBlock):
             return forms.ChoiceField
 
     def use_defaults_from_category(self, kwargs, category):
+        map = {'field_label': 'label', 'help_text': 'help_text'}
+
         for field in ['field_label', 'help_text']:
-            if not kwargs[field]:
-                kwargs[field] = getattr(category, field)
+            if field not in kwargs:
+                kwargs[map[field]] = getattr(category, field)
 
         return kwargs
 
-- 
GitLab