diff options
| 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 | 
| commit | 946e7d6a9d7fdc16a1cdb960c65b41c241b5d84e (patch) | |
| tree | a7b6069d0c6f06ec0f013482cabbab42df230e07 | |
| parent | 2fbb9f995f69969c3c48504920fe7e236cd2744d (diff) | |
| download | Ishtar-946e7d6a9d7fdc16a1cdb960c65b41c241b5d84e.tar.bz2 Ishtar-946e7d6a9d7fdc16a1cdb960c65b41c241b5d84e.zip | |
Dating: fix is identical when precise_dating is null
| -rw-r--r-- | archaeological_context_records/models.py | 6 | 
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 | 
