diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bec7314bf..8f41225aee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ UNRELEASED ---------- * [ [#1718](https://github.com/digitalfabrik/integreat-cms/issues/1718) ] Enable submitting feedback about fallback translations of events and pois +* [ [#1793](https://github.com/digitalfabrik/integreat-cms/issues/1793) ] Fix sending feedback for recurring events 2022.10.2 diff --git a/integreat_cms/api/v3/feedback/event_feedback.py b/integreat_cms/api/v3/feedback/event_feedback.py index c03e1dc73e..e2adc018ef 100644 --- a/integreat_cms/api/v3/feedback/event_feedback.py +++ b/integreat_cms/api/v3/feedback/event_feedback.py @@ -1,4 +1,5 @@ import logging +import re from django.http import JsonResponse, Http404 @@ -67,10 +68,11 @@ def event_feedback_internal(data, region, language, comment, rating, is_technica :return: JSON object according to APIv3 single page feedback endpoint definition :rtype: ~django.http.JsonResponse """ - event_translation_slug = data.get("slug") + # Remove date from the slug for recurrung events + event_translation_slug = re.sub(r"\$\d{4}-\d{2}-\d{2}$", "", data.get("slug")) events = region.events.filter( - translations__slug=data.get("slug"), + translations__slug=event_translation_slug, translations__language=language, ).distinct()