diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-16 15:58:53 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:41:51 +0200 |
commit | f6c6695b19f6d75dc5fa6da0d1389f90f24835bc (patch) | |
tree | 993de482bd8e9be26a8ac295e06b501f8a2b39dc /archaeological_finds/models_finds.py | |
parent | f05d73437dd9b7703cd225f5bf84446a3c443900 (diff) | |
download | Ishtar-f6c6695b19f6d75dc5fa6da0d1389f90f24835bc.tar.bz2 Ishtar-f6c6695b19f6d75dc5fa6da0d1389f90f24835bc.zip |
✨ Biographical note sheet
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 030328d1d..68b845f59 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -2219,6 +2219,12 @@ class Find( from django.utils.formats import date_format if not self.museum_entry_date: return + if self.museum_entry_date and self.museum_entry_date_end and ( + self.museum_entry_date.year == self.museum_entry_date_end.year and + self.museum_entry_date.month == 1 and self.museum_entry_date_end.month == 12 and + self.museum_entry_date.day == 1 and self.museum_entry_date_end.day == 31 + ): + return self.museum_entry_date.year dates = [date_format(self.museum_entry_date, format='SHORT_DATE_FORMAT', use_l10n=True)] if self.museum_entry_date_end: dates.append(date_format(self.museum_entry_date_end, format='SHORT_DATE_FORMAT', use_l10n=True)) |