From 841da813db8716dd24c767af4002d78df0e7d64a Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Wed, 10 Nov 2021 13:11:13 +1300 Subject: [PATCH] Add filter ignore fields to zone model --- .../api/migrations/0006_auto_20211109_2255.py | 31 +++++++++++++++++++ backend/right_tree/api/models.py | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 backend/right_tree/api/migrations/0006_auto_20211109_2255.py diff --git a/backend/right_tree/api/migrations/0006_auto_20211109_2255.py b/backend/right_tree/api/migrations/0006_auto_20211109_2255.py new file mode 100644 index 0000000..2f532b2 --- /dev/null +++ b/backend/right_tree/api/migrations/0006_auto_20211109_2255.py @@ -0,0 +1,31 @@ +# Generated by Django 3.2.8 on 2021-11-09 22:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0005_auto_20211104_2246'), + ] + + operations = [ + migrations.AlterModelOptions( + name='zone', + options={'ordering': ['name', 'variant', 'refined_variant', 'id']}, + ), + migrations.AlterModelOptions( + name='zoneimagesegment', + options={'ordering': ['segment_order', 'id']}, + ), + migrations.AddField( + model_name='zone', + name='ignore_location_filter', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='zone', + name='ignore_soil_order_filter', + field=models.BooleanField(default=False), + ), + ] diff --git a/backend/right_tree/api/models.py b/backend/right_tree/api/models.py index 0de2c77..555578c 100644 --- a/backend/right_tree/api/models.py +++ b/backend/right_tree/api/models.py @@ -76,6 +76,8 @@ class Zone(models.Model): refined_variant = models.CharField(null=True, blank=True, max_length=100) redirect_habitat = models.ForeignKey( HabitatImage, blank=True, null=True, on_delete=models.CASCADE, related_name='zone_redirects') + ignore_soil_order_filter = models.BooleanField(default=False) + ignore_location_filter = models.BooleanField(default=False) def __str__(self): refined_variant_str = f", {self.refined_variant}" if self.refined_variant is not None else ""