diff --git a/server/features/events.feature b/server/features/events.feature index da5a4c999..e0da2d6c6 100644 --- a/server/features/events.feature +++ b/server/features/events.feature @@ -1713,6 +1713,15 @@ Feature: Events """ {"related_events": [{"_id": "#events._id#", "link_type": "secondary"}]} """ + When we get "/events/event_1" + Then we get existing resource + """ + { + "planning_ids": [ + "plan1" + ] + } + """ @auth Scenario: Link new Event with one_primary link method diff --git a/server/planning/events/events.py b/server/planning/events/events.py index 49d0f9b5e..058894b7f 100644 --- a/server/planning/events/events.py +++ b/server/planning/events/events.py @@ -174,7 +174,7 @@ def on_fetched_item(self, doc): self._enhance_event_item(doc) def _enhance_event_item(self, doc): - plannings = get_related_planning_for_events([doc[config.ID_FIELD]], "primary") + plannings = get_related_planning_for_events([doc[config.ID_FIELD]]) if len(plannings): doc["planning_ids"] = [planning.get("_id") for planning in plannings]