From a7db42b944062cea47a7333edaa2b6f42a1f51e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergei=20Ts=C3=B5ganov?= Date: Tue, 11 Jan 2022 17:12:54 +0200 Subject: [PATCH] Prevent creating duplicate domain status history record --- app/controllers/admin/domains_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/domains_controller.rb b/app/controllers/admin/domains_controller.rb index 20f47da02..be20e83fe 100644 --- a/app/controllers/admin/domains_controller.rb +++ b/app/controllers/admin/domains_controller.rb @@ -49,7 +49,9 @@ module Admin rollback_history = @domain.json_statuses_history&.[]('admin_store_statuses_history') dp = ignore_empty_statuses @domain.is_admin = true - @domain.admin_status_update dp[:statuses] + PaperTrail.request(enabled: false) do + @domain.admin_status_update dp[:statuses] + end if @domain.update(dp) flash[:notice] = I18n.t('domain_updated')