From cdc8b01d2f115eb5d95a419fdf30b85dc5e5d754 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 26 Oct 2020 13:15:38 +0100 Subject: [PATCH] project field in HonoraryCertificate class blank=True --- input/migrations/0026_auto_20201026_1214.py | 19 +++++++++++++++++++ input/models.py | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 input/migrations/0026_auto_20201026_1214.py diff --git a/input/migrations/0026_auto_20201026_1214.py b/input/migrations/0026_auto_20201026_1214.py new file mode 100644 index 0000000..31f84be --- /dev/null +++ b/input/migrations/0026_auto_20201026_1214.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.1 on 2020-10-26 12:14 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0025_auto_20201026_1048'), + ] + + operations = [ + migrations.AlterField( + model_name='honorarycertificate', + name='project', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='input.project'), + ), + ] diff --git a/input/models.py b/input/models.py index b5ea84a..9cf0aac 100644 --- a/input/models.py +++ b/input/models.py @@ -66,14 +66,14 @@ class HonoraryCertificate(Intern): ''' this class is also used for accreditations ''' # request_url = models.CharField(max_length=2000) - project = models.ForeignKey(Project, null = True, on_delete = models.SET_NULL) + project = models.ForeignKey(Project, null=True, blank=True, on_delete=models.SET_NULL) def __str__(self): return "Certificate for " + self.realname class Travel(Intern): - project = models.ForeignKey(Project, on_delete = models.CASCADE) + project = models.ForeignKey(Project, on_delete=models.CASCADE)