summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-05-28 10:16:28 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2020-05-28 10:16:28 +0200
commit18f8006b70d52bbafe5ab75478f1f963aaf7636f (patch)
treea7b6069d0c6f06ec0f013482cabbab42df230e07 /archaeological_context_records/models.py
parent7c66b6e6c96fb976cb0cc8b62dcf00a6e3f3ad30 (diff)
downloadIshtar-18f8006b70d52bbafe5ab75478f1f963aaf7636f.tar.bz2
Ishtar-18f8006b70d52bbafe5ab75478f1f963aaf7636f.zip
Dating: fix is identical when precise_dating is null
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 6bf8bc6be..848af5495 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -199,8 +199,10 @@ class Dating(models.Model):
value1 = getattr(dating_1, attr)
value2 = getattr(dating_2, attr)
if attr == "precise_dating":
- value1 = value1.strip()
- value2 = value2.strip()
+ if value1:
+ value1 = value1.strip()
+ if value2:
+ value2 = value2.strip()
if value1 != value2:
return False
return True