mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 11:26:22 +00:00
Migrar los onions primero
Como hostname también es un método de values, al preferir hostname antes que onion el deploy ya había inicializado el hostname temporal
This commit is contained in:
parent
955604b05a
commit
64d7fb6df0
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ class AddHostnameToDeploys < ActiveRecord::Migration[6.1]
|
||||||
site.name = site.name.split('.', 2).first if site.name.include?('.')
|
site.name = site.name.split('.', 2).first if site.name.include?('.')
|
||||||
|
|
||||||
site.deploys.find_each do |deploy|
|
site.deploys.find_each do |deploy|
|
||||||
hostname = (deploy.values[:hostname] || deploy.values[:onion] || deploy.hostname || "#{SecureRandom.hex}.invalid").dup.sub(/\.\z/, '')
|
hostname = (deploy.values[:onion] || deploy.values[:hostname] || deploy.hostname || "#{SecureRandom.hex}.invalid").dup.sub(/\.\z/, '')
|
||||||
deploy.update_columns hostname_tmp: hostname
|
deploy.update_columns hostname_tmp: hostname
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue