on pointe les possibles problèmes de la gestion partielle des récurrences

This commit is contained in:
Jean-Marie Favreau 2024-01-07 10:40:30 +01:00
parent 78579af9a1
commit a4965731e4
4 changed files with 4 additions and 1 deletions

View File

@ -311,7 +311,7 @@ class Event(models.Model):
etime = time.fromisoformat(self.end_time) if isinstance(self.end_time, str) else time() if self.end_time is None else self.end_time
self.recurrence_dtstart = datetime.combine(sday, stime)
# TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65
if self.recurrences is None or len(self.recurrences.rrules) == 0:
if self.end_day is None:
self.dtend = None

View File

@ -13,6 +13,7 @@
{% if event.recurrences %}
<p class="subentry-search">
{% picto_from_name "repeat" %}
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
depuis le {{ event.recurrences.dtstart.date }}{% for r in event.recurrences.rrules %},
{{ r.to_text }}
{% endfor %}

View File

@ -71,6 +71,7 @@
{% if event.recurrences %}
<p class="footer">
{% picto_from_name "repeat" %}
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
depuis le {{ event.recurrences.dtstart.date }}{% for r in event.recurrences.rrules %},
{{ r.to_text }}
{% endfor %}

View File

@ -50,6 +50,7 @@
{% if event.recurrences %}
<p class="footer">
{% picto_from_name "repeat" %}
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
{% for r in event.recurrences.rrules %}
{{ r.to_text }}{% if not forloop.first %}, {% endif %}{% endfor %}, depuis le {{ event.recurrences.dtstart.date }}
{% if event.recurrences.exdates|length > 0 %}, sauf