diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index fe6a85344..4c736bb02 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -127,7 +127,7 @@ class IssuesController < ApplicationController def new @all_branches = [] - get_all_branches = Gitea::Repository::BranchesService.new(@user, @repository.try(:identifier)).call + get_all_branches = Gitea::Repository::BranchesService.new(@user, @project.repository.try(:identifier)).call if get_all_branches && get_all_branches.size > 0 get_all_branches.each do |b| @all_branches.push(b["name"])