5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 11:36:21 +00:00

Merge branch 'issue-14540' of https://0xacab.org/sutty/sutty into 17.3.alpine.panel.sutty.nl

This commit is contained in:
Sutty 2023-11-01 20:03:27 +00:00
commit 18eb0c0c90
2 changed files with 20 additions and 4 deletions

View file

@ -101,12 +101,14 @@ class DeployDistributedPress < Deploy
# El cliente de la API # El cliente de la API
# #
# TODO: cuando soportemos más, tiene que haber una relación entre
# DeployDistributedPress y DistributedPressPublisher.
#
# @return [DistributedPressPublisher] # @return [DistributedPressPublisher]
def publisher def publisher
@publisher ||= DistributedPressPublisher.last @publisher ||=
if distributed_press_publisher_id
DistributedPressPublisher.find(distributed_press_publisher_id)
else
DistributedPressPublisher.find_by_default(true)
end
end end
# El cliente para actualizar el sitio # El cliente para actualizar el sitio

View file

@ -0,0 +1,14 @@
# frozen_string_literal: true
# Una instancia es la instancia por defecto
class AddDefaultToDistributedPressPublisher < ActiveRecord::Migration[6.1]
def up
add_column :distributed_press_publishers, :default, :boolean, default: false
DistributedPressPublisher.last.update(default: true)
end
def down
remove_column :distributed_press_publishers, :default
end
end