diff --git a/app/models/concerns/project/default_branch.rb b/app/models/concerns/project/default_branch.rb index 5f5224be7..0280fea81 100644 --- a/app/models/concerns/project/default_branch.rb +++ b/app/models/concerns/project/default_branch.rb @@ -15,6 +15,7 @@ module Project::DefaultBranch # Returns found String branch name. def resolve_default_branch + return default_branch unless owner.is_a?(Group) && owner.default_branch.present? default_branch == 'master' ? owner.default_branch : default_branch end