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

[#42552] fixed self link with no query data

Eric Schubert749790455ad9
diff --git a/lib/api/decorators/unpaginated_collection.rb b/lib/api/decorators/unpaginated_collection.rb
index 3f7a00ab29d..3446f8a0812 100644
--- a/lib/api/decorators/unpaginated_collection.rb
+++ b/lib/api/decorators/unpaginated_collection.rb
@@ -47,6 +47,8 @@ module API
private
def make_self_link(self_link_base, query)
+ return self_link_base if query.empty?
+
"#{self_link_base}?#{query.to_query}"
end
end