Skip to content

Commit 369b395

Browse files
committed
Merge branch 'devel' of github.com:kontron/redmine_oauth into devel
2 parents d6531cc + fd76d3b commit 369b395

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/redmine_oauth_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ def try_to_login(email, info)
311311
end
312312
return if @admin.nil?
313313

314-
user.admin = @admin
315-
Rails.logger.error(user.errors.full_messages.to_sentence) unless user.save
314+
user = User.find(user.id)
315+
Rails.logger.error(user.errors.full_messages.to_sentence) unless user.update(admin: @admin)
316316
end
317317

318318
def oauth_client

0 commit comments

Comments
 (0)