diff --git a/opentech/apply/funds/blocks.py b/opentech/apply/funds/blocks.py index f07a94967ef29d66999e5ed9c0675815c8eddb3a..865cfd66336e60e52622440583ea617065815e34 100644 --- a/opentech/apply/funds/blocks.py +++ b/opentech/apply/funds/blocks.py @@ -26,7 +26,6 @@ class CustomFormFieldsBlock(FormFieldsBlock): else: error_dict = dict() - block_types = [block.block_type for block in value] missing = set(REQUIRED_BLOCK_NAMES) - set(block_types) @@ -75,7 +74,7 @@ class MustIncludeStatic(StaticBlock): errors = kwargs.pop('errors') if errors: # Pretend the error is a readonly input so that we get nice formatting - error_message= '<div class="error"><input readonly placeholder="{}"></div>'.format(errors[0]) + error_message = '<div class="error"><input readonly placeholder="{}"></div>'.format(errors[0]) else: error_message = '' form = super().render_form(*args, **kwargs) @@ -100,4 +99,4 @@ class ValueBlock(MustIncludeFieldBlock): description = 'The value of the project' -REQUIRED_BLOCK_NAMES = [block.name for block in MustIncludeFieldBlock.__subclasses__()] +REQUIRED_BLOCK_NAMES = [block.name for block in MustIncludeFieldBlock.__subclasses__()] diff --git a/opentech/apply/stream_forms/blocks.py b/opentech/apply/stream_forms/blocks.py index e5810e208f099c05843d0f2af190d651b6bd1374..f3b0906e6770e5246c6487cdcb9ac760c6ae7e43 100644 --- a/opentech/apply/stream_forms/blocks.py +++ b/opentech/apply/stream_forms/blocks.py @@ -8,7 +8,7 @@ from django.utils.translation import ugettext_lazy as _ from unidecode import unidecode from wagtail.wagtailcore.blocks import ( StructBlock, TextBlock, CharBlock, BooleanBlock, ListBlock, StreamBlock, - DateBlock, TimeBlock, DateTimeBlock, ChoiceBlock, RichTextBlock,StaticBlock + DateBlock, TimeBlock, DateTimeBlock, ChoiceBlock, RichTextBlock )