Amélioration du formulaire de déclaration de dupliqué

This commit is contained in:
Jean-Marie Favreau 2024-12-26 11:13:00 +01:00
parent 7c9d930e6f
commit ad48b667be
2 changed files with 2 additions and 1 deletions

View File

@ -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
]

View File

@ -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)