summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-02 16:38:18 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-06-17 13:21:27 +0200
commit4129fb1a79f4082466940c3d0b0ced7767697664 (patch)
treec67ac8afe2228a572272dcebe8853d5d82bad9af /archaeological_finds
parentaba701cfb26a9432cd306ba832a5357b0705ae01 (diff)
downloadIshtar-4129fb1a79f4082466940c3d0b0ced7767697664.tar.bz2
Ishtar-4129fb1a79f4082466940c3d0b0ced7767697664.zip
Tests: fix default conversion to str
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_finds.py2
-rw-r--r--archaeological_finds/models_treatments.py8
2 files changed, 3 insertions, 7 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 011e10df1..7bd33018f 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2344,4 +2344,4 @@ class Property(LightHistorizedItem):
verbose_name_plural = _(u"Properties")
def __str__(self):
- return self.person + settings.JOINT + self.find
+ return str(self.person) + settings.JOINT + str(self.find)
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 572f002f2..996e03370 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -219,11 +219,7 @@ class Treatment(DashboardFormItem, ValueGetter, DocumentItem,
ordering = ("-year", "-index", "-start_date")
def __str__(self):
- if self.cached_label:
- return self.cached_label
- self.skip_history_when_saving = True
- self.save()
- return self.cached_label
+ return self.cached_label or ""
@property
def short_class_name(self):
@@ -994,7 +990,7 @@ class TreatmentFile(DashboardFormItem, ClosedItem, DocumentItem,
ordering = ('cached_label',)
def __str__(self):
- return self.cached_label
+ return self.cached_label or ""
@property
def short_class_name(self):