aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-01-21 18:06:48 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-01-21 18:06:48 +0000
commit99ac4056b828d16babbe2dc93695a46cb60e28a4 (patch)
tree446f78bb8ceef18765b705861493b270e6fc084b /ctrack/organisations
parent5f06e5559c00db759574467c3884a4645346b224 (diff)
fixed blank= value on model field
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/migrations/0007_auto_20200121_1806.py24
-rw-r--r--ctrack/organisations/models.py2
2 files changed, 25 insertions, 1 deletions
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)