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

Ensure that we only query origin_user_id when it's missing

Jan Sandbrink79bc13795bfb
diff --git a/app/services/remote_identities/create_service.rb b/app/services/remote_identities/create_service.rb
index 1b4472cd416..fe01cbb893c 100644
--- a/app/services/remote_identities/create_service.rb
+++ b/app/services/remote_identities/create_service.rb
@@ -45,8 +45,8 @@ module RemoteIdentities
end
def call
- @model.origin_user_id = @integration.extract_origin_user_id(@token)
- if @model.changed?
+ if @model.new_record?
+ @model.origin_user_id = @integration.extract_origin_user_id(@token)
if @model.save
OpenProject::Notifications.send(
OpenProject::Events::REMOTE_IDENTITY_CREATED,