Si une date globale existe, on l'utilise si nécessaire comme date de dernière modification
This commit is contained in:
parent
8e6622c178
commit
1f3760b33b
@ -53,11 +53,8 @@ class EventsImporter:
|
|||||||
|
|
||||||
# get events
|
# get events
|
||||||
for event in structure["events"]:
|
for event in structure["events"]:
|
||||||
if "created_date" not in event:
|
if "last_modified" not in event and self.date is not None:
|
||||||
if self.date is not None:
|
event["last_modified"] = self.date
|
||||||
event["created_date"] = self.date
|
|
||||||
else:
|
|
||||||
event["created_date"] = datetime.now()
|
|
||||||
|
|
||||||
if not self.import_event(event):
|
if not self.import_event(event):
|
||||||
return (False, self.error_message)
|
return (False, self.error_message)
|
||||||
|
Loading…
Reference in New Issue
Block a user