on améliore la gestion des dupliqués
This commit is contained in:
parent
750832bf71
commit
4d6187113d
@ -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 @@
|
||||
</header>
|
||||
<ul>
|
||||
{% for e in events %}
|
||||
<li>{{ e.start_day }}{% if e.start_time %} à {{ e.start_time }}{% endif %} : <a href="{{ e.get_absolute_url }}">{{ e.title }}</a> créé le {{ e.created_date }}</li>
|
||||
<li>{{ e.start_day }}{% if e.start_time %} à {{ e.start_time }}{% endif %} : {{ e|picto_status }} <a href="{{ e.get_absolute_url }}">{{ e.title }}</a> créé le {{ e.created_date }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if perms.agenda_culturel.change_duplicatedevents %}
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user