mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Raise transaction isolation level on epp domain update
This commit is contained in:
parent
2fdc487511
commit
821ea1a8b2
1 changed files with 7 additions and 1 deletions
|
@ -103,13 +103,19 @@ module Epp
|
|||
def update
|
||||
authorize! :update, @domain, @password
|
||||
|
||||
updated = @domain.update(params[:parsed_frame], current_user)
|
||||
updated = Domain.transaction(isolation: isolation_level) do
|
||||
@domain.update(params[:parsed_frame], current_user)
|
||||
end
|
||||
(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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue