summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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