From 9ca40d66b9b2959814b9cc017af4d6cffe9393ba Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Fri, 28 Aug 2020 11:07:55 +0200 Subject: [PATCH] TMSS-272: allow blank --- SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py | 4 ++-- SAS/TMSS/src/tmss/tmssapp/models/specification.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py index c47c3f27e22..e32e4be72aa 100644 --- a/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py +++ b/SAS/TMSS/src/tmss/tmssapp/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.2.12 on 2020-08-06 10:12 +# Generated by Django 3.0.9 on 2020-08-28 09:06 from django.conf import settings import django.contrib.postgres.fields @@ -703,7 +703,7 @@ class Migration(migrations.Migration): ('description', models.CharField(help_text='A longer description of this object.', max_length=255)), ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), - ('validation_code_js', models.CharField(help_text='JavaScript code for additional (complex) validation.', max_length=128)), + ('validation_code_js', models.CharField(blank=True, default='', help_text='JavaScript code for additional (complex) validation.', max_length=128)), ], ), migrations.CreateModel( diff --git a/SAS/TMSS/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/src/tmss/tmssapp/models/specification.py index 640e8f6bcc1..e340f10ecec 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/specification.py @@ -253,7 +253,7 @@ class DefaultSchedulingUnitTemplate(BasicCommon): class TaskTemplate(Template): - validation_code_js = CharField(max_length=128, help_text='JavaScript code for additional (complex) validation.') + validation_code_js = CharField(max_length=128, blank=True, default="", help_text='JavaScript code for additional (complex) validation.') class Meta: # TODO: move up to the abstract base class and replace with django 3.0 UniqueConstraint(... name='%*class)s_unique_name_version) -- GitLab