diff --git a/app/models/communication/website/with_deuxfleurs.rb b/app/models/communication/website/with_deuxfleurs.rb index 1d71c340ec9d99a9e2e60c10c14acc1f73ec083d..20e57f16175299299b49720dbcfc57639334f250 100644 --- a/app/models/communication/website/with_deuxfleurs.rb +++ b/app/models/communication/website/with_deuxfleurs.rb @@ -13,6 +13,7 @@ module Communication::Website::WithDeuxfleurs # 4. both exists, deuxfleurs hosting needs to change identifier (Waiting for API possibility) def deuxfleurs_setup return unless deuxfleurs_hosting? + return if deuxfleurs_setup_done? Communication::Website::Deuxfleurs::SetupJob.perform_later(id) end @@ -34,6 +35,10 @@ module Communication::Website::WithDeuxfleurs protected + def deuxfleurs_setup_done? + deuxfleurs_hosting? && repository.present? && deuxfleurs_identifier.present? + end + def deuxfleurs_golive return unless in_production_changed? && in_production # https://www.test.com -> www.test.com