Fix bad validation rules
This commit is contained in:
parent
2ee912b8a6
commit
b375de115e
@ -176,7 +176,8 @@ class LongCaseStudyForm(BaseCaseStudyForm):
|
|||||||
|
|
||||||
self.fields['positive_case_type'] = forms.ChoiceField(
|
self.fields['positive_case_type'] = forms.ChoiceField(
|
||||||
widget=forms.RadioSelect(),
|
widget=forms.RadioSelect(),
|
||||||
choices=POSITIVE_CASE_TYPE_CHOICES
|
choices=POSITIVE_CASE_TYPE_CHOICES,
|
||||||
|
required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
self.fields['project_owners'].required = True
|
self.fields['project_owners'].required = True
|
||||||
|
20
apps/map/migrations/0060_auto_20180523_1659.py
Normal file
20
apps/map/migrations/0060_auto_20180523_1659.py
Normal 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'),
|
||||||
|
),
|
||||||
|
]
|
@ -739,9 +739,7 @@ class CaseStudy(models.Model):
|
|||||||
verbose_name=_("Project life span"),
|
verbose_name=_("Project life span"),
|
||||||
help_text=_("e.g. 12 years of production, 15 years overall"),
|
help_text=_("e.g. 12 years of production, 15 years overall"),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
default=None,
|
blank=True
|
||||||
null=True,
|
|
||||||
blank=None
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# 2.3.3.2
|
# 2.3.3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user