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

avoid instantiating ProjectRepresenter if it is not embedded anyway

ulferts40462d099db5
diff --git a/modules/costs/lib/api/v3/time_entries/time_entries_activity_representer.rb b/modules/costs/lib/api/v3/time_entries/time_entries_activity_representer.rb
index 9a90c9aaf47..07f7df63f36 100644
--- a/modules/costs/lib/api/v3/time_entries/time_entries_activity_representer.rb
+++ b/modules/costs/lib/api/v3/time_entries/time_entries_activity_representer.rb
@@ -53,6 +53,8 @@ module API
end
},
getter: ->(*) {
+ next unless embed_links
+
active_projects.map do |project|
Projects::ProjectRepresenter.create(project, current_user:)
end