fixes
This commit is contained in:
parent
53d7e74e31
commit
55a3978a40
2 changed files with 9 additions and 2 deletions
|
@ -41,6 +41,13 @@ class SitesController < ApplicationController
|
|||
|
||||
def edit
|
||||
@site = find_site
|
||||
|
||||
# TODO: esto está acá para ayudar en la migración de
|
||||
if @site.deploys.empty?
|
||||
@site.deploys.build(type: 'DeployLocal')
|
||||
@site.deploys.build type: 'DeployZip'
|
||||
end
|
||||
|
||||
authorize @site
|
||||
end
|
||||
|
||||
|
@ -51,7 +58,7 @@ class SitesController < ApplicationController
|
|||
service = SiteService.new(site: @site, params: site_params,
|
||||
usuarie: current_usuarie)
|
||||
|
||||
if service.update
|
||||
if service.update.valid?
|
||||
redirect_to sites_path
|
||||
else
|
||||
render 'edit'
|
||||
|
|
|
@ -81,7 +81,7 @@ class Site
|
|||
|
||||
# Hay commits sin aplicar?
|
||||
def needs_pull?
|
||||
commits.empty?
|
||||
!commits.empty?
|
||||
end
|
||||
|
||||
# Guarda los cambios en git, de a un archivo por vez
|
||||
|
|
Loading…
Reference in a new issue