From 63884a89150e55df0af122654ff27f9dfbeeaea3 Mon Sep 17 00:00:00 2001 From: jazzari Date: Tue, 14 Nov 2023 16:05:19 +0100 Subject: [PATCH] merge WIP --- app/services/site_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 532d48ac..d7112321 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -88,6 +88,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do end def rename(name) + moved = false moved = false Site.transaction do raise ActiveRecord::Rollback if site.path @@ -96,6 +97,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do ActiveStorage::Blob.where(service_name: site.name_was).update_all(service_name: site.name) site.save moved = true + moved = true rescue StandardError FileUtils.mv (site.path, site.path_was) if moved raise