Fix bad validation rules

This commit is contained in:
Anna Sidwell 2018-05-23 19:15:30 +02:00
parent 2ee912b8a6
commit b375de115e
3 changed files with 23 additions and 4 deletions

View File

@ -176,7 +176,8 @@ class LongCaseStudyForm(BaseCaseStudyForm):
self.fields['positive_case_type'] = forms.ChoiceField(
widget=forms.RadioSelect(),
choices=POSITIVE_CASE_TYPE_CHOICES
choices=POSITIVE_CASE_TYPE_CHOICES,
required=False
)
self.fields['project_owners'].required = True

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-05-23 16:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0059_auto_20180519_1801'),
]
operations = [
migrations.AlterField(
model_name='casestudy',
name='project_life_span',
field=models.CharField(blank=True, help_text='e.g. 12 years of production, 15 years overall', max_length=200, verbose_name='Project life span'),
),
]

View File

@ -739,9 +739,7 @@ class CaseStudy(models.Model):
verbose_name=_("Project life span"),
help_text=_("e.g. 12 years of production, 15 years overall"),
max_length=200,
default=None,
null=True,
blank=None
blank=True
)
# 2.3.3.2