diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 1439adb..d529e99 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1372,6 +1372,11 @@ class Event(models.Model): if uuid not in self.uuids: 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) + # Limitation: the given events should not be considered similar one to another... def import_events(events, remove_missing_from_source=None): @@ -1462,7 +1467,7 @@ class Event(models.Model): nb_updated = Event.objects.bulk_update( to_update, fields=Event.data_fields(no_m2m=True) - + ["imported_date", "modified_date", "uuids", "status"], + + ["imported_date", "modified_date", "uuids", "status", "import_sources"], ) nb_draft = 0