From a1daa759ecaaa0f1dd27b1ed4caa35aff972d0eb Mon Sep 17 00:00:00 2001 From: jazzari Date: Wed, 22 Nov 2023 17:12:15 +0100 Subject: [PATCH] fix: movido boolean en metodo Rename #13077 --- app/services/site_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 51146b13..7e1bef6b 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -95,9 +95,9 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do Site.transaction do raise ActiveRecord::Rollback if File.exists?(site.path) FileUtils.mv (site.path_was, site.path) + moved = true ActiveStorage::Blob.where(service_name: site.name_was).update_all(service_name: site.name) site.save - moved = true rescue StandardError FileUtils.mv (site.path, site.path_was) if moved raise