summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r--archaeological_warehouse/models.py16
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(