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

[#50656] no connection manager init on parsing storages

Eric Schubert4bc5241bb4b7
diff --git a/modules/storages/lib/api/v3/storages/storage_representer.rb b/modules/storages/lib/api/v3/storages/storage_representer.rb
index f4877fc26b2..762c79551c6 100644
--- a/modules/storages/lib/api/v3/storages/storage_representer.rb
+++ b/modules/storages/lib/api/v3/storages/storage_representer.rb
@@ -75,8 +75,11 @@ module API::V3::Storages
extend ClassMethods
def initialize(model, current_user:, embed_links: nil)
- @connection_manager =
- ::OAuthClients::ConnectionManager.new(user: current_user, configuration: model.oauth_configuration)
+ unless model.empty?
+ # Do not instantiate a connection manager, if representer is used for parsing
+ @connection_manager =
+ ::OAuthClients::ConnectionManager.new(user: current_user, configuration: model.oauth_configuration)
+ end
super
end