From 4d6187113dfbcc24db30b5673e1053a9ebede744 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 3 May 2024 14:19:18 +0200 Subject: [PATCH] =?UTF-8?q?on=20am=C3=A9liore=20la=20gestion=20des=20dupli?= =?UTF-8?q?qu=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/templates/agenda_culturel/duplicates.html | 3 ++- src/agenda_culturel/views.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/templates/agenda_culturel/duplicates.html b/src/agenda_culturel/templates/agenda_culturel/duplicates.html index d561a01..8e90834 100644 --- a/src/agenda_culturel/templates/agenda_culturel/duplicates.html +++ b/src/agenda_culturel/templates/agenda_culturel/duplicates.html @@ -1,6 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load utils_extra %} +{% load event_extra %} {% block title %}Événements possiblement dupliqués{% endblock %} @@ -24,7 +25,7 @@ {% if perms.agenda_culturel.change_duplicatedevents %} diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 914ef53..1e934ba 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1085,6 +1085,8 @@ def merge_duplicate(request, pk): for e in events: e.status = Event.STATUS.TRASH Event.objects.bulk_update(events, fields=["status"]) + # remove duplicate + edup.delete() messages.info(request, _("The merge has been successfully completed.")) return HttpResponseRedirect(new_event.get_absolute_url())