diff --git a/db/Repository.go b/db/Repository.go index 34b04123..3e5eed3f 100644 --- a/db/Repository.go +++ b/db/Repository.go @@ -115,7 +115,7 @@ func (r Repository) Validate() error { return &ValidationError{"repository url can't be empty"} } - if r.GitBranch == "" { + if r.GetType() != RepositoryLocal && r.GitBranch == "" { return &ValidationError{"repository branch can't be empty"} } diff --git a/web2/src/components/RepositoryForm.vue b/web2/src/components/RepositoryForm.vue index 3e60c845..6ad47294 100644 --- a/web2/src/components/RepositoryForm.vue +++ b/web2/src/components/RepositoryForm.vue @@ -76,9 +76,9 @@