From ad48b667be29ca9b73d3aa135c9f66a9f9945674 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Thu, 26 Dec 2024 11:13:00 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20du=20formulaire=20de=20d?= =?UTF-8?q?=C3=A9claration=20de=20dupliqu=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/forms.py | 2 +- src/agenda_culturel/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index fe100fc..d5cf26b 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -501,7 +501,7 @@ class SelectEventInList(Form): super().__init__(*args, **kwargs) self.fields["event"].choices = [ - (e.pk, str(e.start_day) + " " + e.title + ((", " + e.location) if e.location else "")) for e in events + (e.pk, (e.start_time.strftime('%H:%M') + " : " if e.start_time else "") + e.title + ((", " + e.location) if e.location else "")) for e in events ] diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index df70345..173c809 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1578,6 +1578,7 @@ def set_duplicate(request, year, month, day, pk): event.other_versions is None or event.other_versions != e.other_versions ) + and e.status != Event.STATUS.TRASH ] form = SelectEventInList(events=others)