diff options
Diffstat (limited to 'models/branches.go')
-rw-r--r-- | models/branches.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/branches.go b/models/branches.go index 3c62c7a87b..caca9e23fe 100644 --- a/models/branches.go +++ b/models/branches.go @@ -536,7 +536,7 @@ func (repo *Repository) GetDeletedBranches() ([]*DeletedBranch, error) { // GetDeletedBranchByID get a deleted branch by its ID func (repo *Repository) GetDeletedBranchByID(id int64) (*DeletedBranch, error) { deletedBranch := &DeletedBranch{} - has, err := db.GetEngine(db.DefaultContext).ID(id).Get(deletedBranch) + has, err := db.GetEngine(db.DefaultContext).Where("repo_id = ?", repo.ID).And("id = ?", id).Get(deletedBranch) if err != nil { return nil, err } |