Fix bug quand un événement n'a pas tous les champs définis

This commit is contained in:
Jean-Marie Favreau 2024-12-28 17:13:06 +01:00
parent 045cf06e06
commit 273287a250

View File

@ -1511,9 +1511,12 @@ class Event(models.Model):
self.uuids.append(uuid)
# add possible missing sources
for source in other.import_sources:
if source not in self.import_sources:
self.import_sources.append(source)
if other.import_sources:
if not self.import_sources:
self.import_sources = []
for source in other.import_sources:
if source not in self.import_sources:
self.import_sources.append(source)
# Limitation: the given events should not be considered similar one to another...
def import_events(events, remove_missing_from_source=None, user_id=None):