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:
parent
49106874b0
commit
a1daa759ec
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue