Skip to content
Snippets Groups Projects
Commit 9d744cb1 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

fixup! Tidy up the code in the clean method of Form

parent e7fccf47
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ from opentech.apply.stream_forms.blocks import FormFieldsBlock, FormFieldBlock ...@@ -12,7 +12,7 @@ from opentech.apply.stream_forms.blocks import FormFieldsBlock, FormFieldBlock
from opentech.apply.categories.blocks import CategoryQuestionBlock from opentech.apply.categories.blocks import CategoryQuestionBlock
def find_duplciates(items): def find_duplicates(items):
counted = Counter(items) counted = Counter(items)
duplicates = [ duplicates = [
name for name, count in counted.items() if count > 1 name for name, count in counted.items() if count > 1
...@@ -39,7 +39,7 @@ class CustomFormFieldsBlock(FormFieldsBlock): ...@@ -39,7 +39,7 @@ class CustomFormFieldsBlock(FormFieldsBlock):
missing = set(REQUIRED_BLOCK_NAMES) - set(block_types) missing = set(REQUIRED_BLOCK_NAMES) - set(block_types)
duplicates = [ duplicates = [
name for name in find_duplciates(block_types) name for name in find_duplicates(block_types)
if name in REQUIRED_BLOCK_NAMES if name in REQUIRED_BLOCK_NAMES
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment