From 688d3c0af7639503b8ccc337dca452e1f826fd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 22 Dec 2019 02:06:23 +0100 Subject: [PATCH] blank=True on label_settings --- src/c3nav/mapdata/models/locations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c3nav/mapdata/models/locations.py b/src/c3nav/mapdata/models/locations.py index b051c335..1dbc74c4 100644 --- a/src/c3nav/mapdata/models/locations.py +++ b/src/c3nav/mapdata/models/locations.py @@ -160,7 +160,7 @@ class Location(LocationSlug, AccessRestrictionMixin, TitledMixin, models.Model): class SpecificLocation(Location, models.Model): groups = models.ManyToManyField('mapdata.LocationGroup', verbose_name=_('Location Groups'), blank=True) - label_settings = models.ForeignKey('mapdata.LabelSettings', null=True, on_delete=models.PROTECT, + label_settings = models.ForeignKey('mapdata.LabelSettings', null=True, blank=True, on_delete=models.PROTECT, verbose_name=_('label settings')) label_override = I18nField(_('Label override'), plural_name='label_overrides', blank=True, fallback_any=True) @@ -309,7 +309,7 @@ class LocationGroup(Location, models.Model): verbose_name=_('Category')) priority = models.IntegerField(default=0, db_index=True) hierarchy = models.IntegerField(default=0, db_index=True, verbose_name=_('hierarchy')) - label_settings = models.ForeignKey('mapdata.LabelSettings', null=True, on_delete=models.PROTECT, + label_settings = models.ForeignKey('mapdata.LabelSettings', null=True, blank=True, on_delete=models.PROTECT, verbose_name=_('label settings'), help_text=_('unless location specifies otherwise')) color = models.CharField(null=True, blank=True, max_length=32, verbose_name=_('background color'))