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 | d9844aa5f16efbdf82516bc00d473410bfe729f5 (patch) | |
tree | cd95c65028eeac282b12d435e4a5c44045123575 /archaeological_context_records/models.py | |
parent | 1a86dfe4ab25013f64f6028d8e09cc0ce0a1fcd8 (diff) | |
download | Ishtar-d9844aa5f16efbdf82516bc00d473410bfe729f5.tar.bz2 Ishtar-d9844aa5f16efbdf82516bc00d473410bfe729f5.zip |
TextField: blank=True, null=True -> blank=True, default=""
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 715e6286c..56dc66340 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -81,8 +81,8 @@ class Dating(models.Model): quality = models.ForeignKey(DatingQuality, verbose_name=_("Quality"), on_delete=models.SET_NULL, blank=True, null=True) - precise_dating = models.TextField(_("Precise dating"), blank=True, - null=True) + precise_dating = models.TextField( + _("Precise dating"), blank=True, default="") objects = UUIDModelManager() ASSOCIATED_ALT_NAMES = { 'datings__period': SearchAltName( @@ -530,7 +530,7 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, # fields uuid = models.UUIDField(default=uuid.uuid4) - 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) parcel = models.ForeignKey( @@ -546,8 +546,8 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, on_delete=models.SET_NULL, blank=True, null=True, related_name='context_records') label = models.CharField(_("ID"), max_length=200) - description = models.TextField(_("Description"), blank=True, null=True) - comment = models.TextField(_("General comment"), blank=True, null=True) + description = models.TextField(_("Description"), blank=True, default="") + comment = models.TextField(_("General comment"), blank=True, default="") opening_date = models.DateField(_("Opening date"), blank=True, null=True) closing_date = models.DateField(_("Closing date"), blank=True, null=True) @@ -561,19 +561,19 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, _("Depth of appearance (m)"), blank=True, null=True) surface = models.IntegerField(_("Surface (m2)"), blank=True, null=True) location = models.TextField( - _("Location"), blank=True, null=True, + _("Location"), blank=True, default="", help_text=_("A short description of the location of the context " "record")) datings = models.ManyToManyField(Dating, related_name='context_records') documentations = models.ManyToManyField(DocumentationType, blank=True) - datings_comment = models.TextField(_("Comment on datings"), blank=True, - null=True) + datings_comment = models.TextField( + _("Comment on datings"), blank=True, default="") unit = models.ForeignKey(Unit, verbose_name=_("Context record type"), on_delete=models.SET_NULL, related_name='+', blank=True, null=True) - filling = models.TextField(_("Filling"), blank=True, null=True) - interpretation = models.TextField(_("Interpretation"), blank=True, - null=True) + filling = models.TextField(_("Filling"), blank=True, default="") + interpretation = models.TextField( + _("Interpretation"), blank=True, default="") taq = models.IntegerField( _("TAQ"), blank=True, null=True, help_text=_("\"Terminus Ante Quem\" the context record can't have " @@ -608,14 +608,14 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, Document, related_name='main_image_context_records', on_delete=models.SET_NULL, verbose_name=_("Main image"), blank=True, null=True) - cached_label = models.TextField(_("Cached name"), null=True, blank=True, + cached_label = models.TextField(_("Cached name"), blank=True, default="", db_index=True) cached_periods = models.TextField( - _("Cached periods label"), blank=True, null=True, + _("Cached periods label"), blank=True, default="", help_text=_("Generated automatically - do not edit") ) cached_related_context_records = models.TextField( - _("Cached related context records"), blank=True, null=True, + _("Cached related context records"), blank=True, default="", help_text=_("Generated automatically - do not edit") ) |