Backport #16805 Fix #16801 Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
This commit is contained in:
		
							parent
							
								
									63178b5654
								
							
						
					
					
						commit
						ab7e36e3a5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -217,7 +217,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) { | ||||||
| 		branches = append(branches, deletedBranches...) | 		branches = append(branches, deletedBranches...) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return branches, totalNumOfBranches - 1 | 	return branches, totalNumOfBranches | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch, | func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue