aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)