diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-12-03 14:54:20 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:22 +0100 |
commit | a971793ef9759c6b99c674ba676607abd743e76b (patch) | |
tree | cd95c65028eeac282b12d435e4a5c44045123575 /archaeological_warehouse/models.py | |
parent | 42e32d4cdd18474c4daf5bf960cebb0855dad9ef (diff) | |
download | Ishtar-a971793ef9759c6b99c674ba676607abd743e76b.tar.bz2 Ishtar-a971793ef9759c6b99c674ba676607abd743e76b.zip |
TextField: blank=True, null=True -> blank=True, default=""
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 872cc1d68..031f04ed4 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -319,7 +319,7 @@ class Warehouse(Address, DocumentItem, GeoItem, CompleteIdentifierItem, "ishtar_common.Organization", blank=True, null=True, related_name='warehouses', verbose_name=_("Organization"), on_delete=models.SET_NULL) - comment = models.TextField(_("Comment"), null=True, blank=True) + comment = models.TextField(_("Comment"), blank=True, default="") associated_divisions = models.ManyToManyField( 'WarehouseDivision', verbose_name=_("Divisions"), blank=True, through='WarehouseDivisionLink' @@ -332,7 +332,7 @@ class Warehouse(Address, DocumentItem, GeoItem, CompleteIdentifierItem, "ishtar_common.Document", related_name='main_image_warehouses', on_delete=models.SET_NULL, verbose_name=_("Main image"), blank=True, null=True) - external_id = models.TextField(_("External ID"), blank=True, null=True) + external_id = models.TextField(_("External ID"), blank=True, default="") auto_external_id = models.BooleanField( _("External ID is set automatically"), default=False) max_division_number = models.IntegerField( @@ -853,19 +853,19 @@ class Container(DocumentItem, Merge, LightHistorizedItem, verbose_name=_("Container type"), related_name="containers") reference = models.TextField(_("Container ref.")) - comment = models.TextField(_("Comment"), null=True, blank=True) - cached_label = models.TextField(_("Localisation"), null=True, blank=True, + comment = models.TextField(_("Comment"), blank=True, default="") + cached_label = models.TextField(_("Localisation"), blank=True, default="", db_index=True) cached_location = models.TextField(_("Cached location"), - null=True, blank=True, db_index=True) + blank=True, default="", db_index=True) cached_division = models.TextField(_("Cached division"), - null=True, blank=True, db_index=True) + blank=True, default="", db_index=True) parent = models.ForeignKey("Container", verbose_name=_("Parent container"), on_delete=models.SET_NULL, related_name="children", blank=True, null=True) index = models.IntegerField(_("Container ID"), default=0) - old_reference = models.TextField(_("Old reference"), blank=True, null=True) - external_id = models.TextField(_("External ID"), blank=True, null=True) + old_reference = models.TextField(_("Old reference"), blank=True, default="") + external_id = models.TextField(_("External ID"), blank=True, default="") auto_external_id = models.BooleanField( _("External ID is set automatically"), default=False) documents = models.ManyToManyField( |