From 2eff3ba7163273f7a81a2450adfc305e77379142 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 28 Aug 2021 12:20:40 -0300 Subject: [PATCH] Agregar las licencias solo si el sitio se pudo crear --- app/services/site_service.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 389549c3..73d50f97 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -13,11 +13,10 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do I18n.with_locale(usuarie&.lang&.to_sym || I18n.default_locale) do site.save && site.config.write && - commit_config(action: :create) + commit_config(action: :create) && + add_licencias end - add_licencias - site end