From 99ac4056b828d16babbe2dc93695a46cb60e28a4 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 21 Jan 2020 18:06:48 +0000 Subject: fixed blank= value on model field --- .../migrations/0007_auto_20200121_1806.py | 24 ++++++++++++++++++++++ ctrack/organisations/models.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ctrack/organisations/migrations/0007_auto_20200121_1806.py (limited to 'ctrack/organisations') diff --git a/ctrack/organisations/migrations/0007_auto_20200121_1806.py b/ctrack/organisations/migrations/0007_auto_20200121_1806.py new file mode 100644 index 0000000..331bba9 --- /dev/null +++ b/ctrack/organisations/migrations/0007_auto_20200121_1806.py @@ -0,0 +1,24 @@ +# Generated by Django 2.2.9 on 2020-01-21 18:06 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('organisations', '0006_auto_20200121_1732'), + ] + + operations = [ + migrations.AlterField( + model_name='address', + name='organisation', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to='organisations.Organisation'), + ), + migrations.AlterField( + model_name='address', + name='type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.AddressType'), + ), + ] diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py index 6bd1249..afc3808 100644 --- a/ctrack/organisations/models.py +++ b/ctrack/organisations/models.py @@ -23,7 +23,7 @@ class Address(models.Model): organisation = models.ForeignKey( Organisation, related_name="addresses", on_delete=models.CASCADE, blank=False ) - type = models.ForeignKey(AddressType, on_delete=models.CASCADE, default=1) + type = models.ForeignKey(AddressType, on_delete=models.CASCADE, blank=False) line1 = models.CharField(max_length=255) line2 = models.CharField(max_length=255) line3 = models.CharField(max_length=255) -- cgit v1.2.3