Si une date globale existe, on l'utilise si nécessaire comme date de dernière modification

This commit is contained in:
Jean-Marie Favreau 2023-12-30 13:48:05 +01:00
parent 8e6622c178
commit 1f3760b33b

View File

@ -53,11 +53,8 @@ class EventsImporter:
# get events
for event in structure["events"]:
if "created_date" not in event:
if self.date is not None:
event["created_date"] = self.date
else:
event["created_date"] = datetime.now()
if "last_modified" not in event and self.date is not None:
event["last_modified"] = self.date
if not self.import_event(event):
return (False, self.error_message)