Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use the correct getter for entity_id

Klaus Zandersd46e1bfa4f26
diff --git a/lib/api/v3/shares/share_representer.rb b/lib/api/v3/shares/share_representer.rb
index a20d27247cb..098aa402416 100644
--- a/lib/api/v3/shares/share_representer.rb
+++ b/lib/api/v3/shares/share_representer.rb
@@ -42,7 +42,7 @@ module API
# associated_resource :entity # TODO: Check if neeeded, and check how we can use polymorphism here
associated_resource :entity,
getter: ::API::V3::Shares::EntityRepresenterFactory.create_getter_lambda(:entity),
- link: ::API::V3::Shares::EntityRepresenterFactory.create_link_lambda(:entity, getter: 'user_id')
+ link: ::API::V3::Shares::EntityRepresenterFactory.create_link_lambda(:entity, getter: 'entity_id')
associated_resource :principal,
getter: ::API::V3::Principals::PrincipalRepresenterFactory