From 0c6450660c0c329298b2c162c9d681d8c26bc40f Mon Sep 17 00:00:00 2001 From: Fanna Lautenbach <lautenbach@astron.nl> Date: Wed, 18 Jan 2023 16:42:35 +0100 Subject: [PATCH] set blank for fields that are auto filled --- ...alter_workspecification_inputs_and_more.py | 24 +++++++++++++++++++ ldvspec/lofardata/models.py | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 ldvspec/lofardata/migrations/0016_alter_workspecification_inputs_and_more.py diff --git a/ldvspec/lofardata/migrations/0016_alter_workspecification_inputs_and_more.py b/ldvspec/lofardata/migrations/0016_alter_workspecification_inputs_and_more.py new file mode 100644 index 00000000..01388720 --- /dev/null +++ b/ldvspec/lofardata/migrations/0016_alter_workspecification_inputs_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 4.1.5 on 2023-01-18 15:41 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lofardata', '0015_alter_dataproduct_dysco_compression'), + ] + + operations = [ + migrations.AlterField( + model_name='workspecification', + name='inputs', + field=models.JSONField(blank=True, null=True), + ), + migrations.AlterField( + model_name='workspecification', + name='related_tasks', + field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), blank=True, null=True, size=None), + ), + ] diff --git a/ldvspec/lofardata/models.py b/ldvspec/lofardata/models.py index 190b45c2..7d327168 100644 --- a/ldvspec/lofardata/models.py +++ b/ldvspec/lofardata/models.py @@ -116,14 +116,14 @@ class WorkSpecification(models.Model): created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True) filters = models.JSONField(null=True) # Input data containing sizes/urls for submission to ATDB - inputs = models.JSONField(null=True) + inputs = models.JSONField(null=True, blank=True) # ATDB Workflow URL selected_workflow = models.CharField(max_length=500, null=True) selected_workflow_tag = models.CharField(max_length=500, null=True, default="Unknown") # Task ID's that were created in ATDB - related_tasks = ArrayField(models.IntegerField(), null=True) + related_tasks = ArrayField(models.IntegerField(), null=True, blank=True) predecessor_specification = models.ForeignKey('self', null=True, on_delete=models.DO_NOTHING, related_name='successor', blank=True) -- GitLab