5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 10:56:24 +00:00

fix: movido boolean en metodo Rename #13077

This commit is contained in:
jazzari 2023-11-22 17:12:15 +01:00
parent 49106874b0
commit a1daa759ec

View file

@ -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