blank=True on label_settings
This commit is contained in:
parent
c9c13074c6
commit
688d3c0af7
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ class Location(LocationSlug, AccessRestrictionMixin, TitledMixin, models.Model):
|
||||||
|
|
||||||
class SpecificLocation(Location, models.Model):
|
class SpecificLocation(Location, models.Model):
|
||||||
groups = models.ManyToManyField('mapdata.LocationGroup', verbose_name=_('Location Groups'), blank=True)
|
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'))
|
verbose_name=_('label settings'))
|
||||||
label_override = I18nField(_('Label override'), plural_name='label_overrides', blank=True, fallback_any=True)
|
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'))
|
verbose_name=_('Category'))
|
||||||
priority = models.IntegerField(default=0, db_index=True)
|
priority = models.IntegerField(default=0, db_index=True)
|
||||||
hierarchy = models.IntegerField(default=0, db_index=True, verbose_name=_('hierarchy'))
|
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'),
|
verbose_name=_('label settings'),
|
||||||
help_text=_('unless location specifies otherwise'))
|
help_text=_('unless location specifies otherwise'))
|
||||||
color = models.CharField(null=True, blank=True, max_length=32, verbose_name=_('background color'))
|
color = models.CharField(null=True, blank=True, max_length=32, verbose_name=_('background color'))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue