Revert "Fix possible doubling of contact objects after race"

This commit is contained in:
Timo Võhmar 2020-06-30 15:39:48 +03:00 committed by GitHub
parent 98a209505d
commit 3be2c384a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 2238 deletions

View file

@ -103,19 +103,13 @@ module Epp
def update
authorize! :update, @domain, @password
updated = Domain.transaction(isolation: isolation_level) do
@domain.update(params[:parsed_frame], current_user)
end
updated = @domain.update(params[:parsed_frame], current_user)
(handle_errors(@domain) && return) unless updated
pending = @domain.epp_pending_update.present?
render_epp_response "/epp/domains/success#{'_pending' if pending}"
end
def isolation_level
:serializable unless Rails.env.test?
end
def delete
authorize! :delete, @domain, @password