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

Allow to create missing OAuth application

Jan Sandbrink8bd755613300
diff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rb
index c23db058f91..80bd05b6c1b 100644
--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb
+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb
@@ -196,7 +196,7 @@ class Storages::Admin::StoragesController < ApplicationController
end
def replace_oauth_application
- @storage.oauth_application.destroy
+ @storage.oauth_application&.destroy
service_result = ::Storages::OAuthApplications::CreateService.new(storage: @storage, user: current_user).call
if service_result.success?