diff --git a/argocd_deployer/models/application_set.py b/argocd_deployer/models/application_set.py index 14ecf78..78ed251 100644 --- a/argocd_deployer/models/application_set.py +++ b/argocd_deployer/models/application_set.py @@ -126,7 +126,7 @@ def _get_master_repository_directory(self, path_does_not_exist_action="create"): get_param = self.env["ir.config_parameter"].get_param path = os.path.join( get_param("argocd.application_set_repo_directory", ""), - get_param("argocd.application_set_branch"), + get_param("argocd.application_set_branch", "master"), ) self._create_path_or_error( path, "Master repository directory", path_does_not_exist_action @@ -250,7 +250,7 @@ def _format_commit_message(self, message): def _get_argocd_template(self): get_param = self.env["ir.config_parameter"].get_param replacements = { - "{{.config.repository_url}}": get_param("argocd.application_set_repo") + "{{.config.repository_url}}": get_param("argocd.application_set_repo", "") or "", "{{.config.branch}}": get_param("argocd.application_set_branch", "master") or "", diff --git a/argocd_deployer/models/repository_base.py b/argocd_deployer/models/repository_base.py index 1f4d884..8c07d19 100644 --- a/argocd_deployer/models/repository_base.py +++ b/argocd_deployer/models/repository_base.py @@ -85,6 +85,6 @@ def _compute_is_immediate_repo_action_visible(self): for application in self: application.is_immediate_repo_action_visible = safe_eval( self.env["ir.config_parameter"].get_param( - "argocd.allow_immediate_deployment" + "argocd.allow_immediate_deployment", "False" ) )