mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Ordering team by name ascending except for 'Owners' (#48)
This commit is contained in:
		
				
					committed by
					
						
						Sandro Santilli
					
				
			
			
				
	
			
			
			
						parent
						
							d318f612a9
						
					
				
				
					commit
					fe8bfa54de
				
			@@ -50,7 +50,7 @@ func (org *User) GetOwnerTeam() (*Team, error) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (org *User) getTeams(e Engine) error {
 | 
					func (org *User) getTeams(e Engine) error {
 | 
				
			||||||
	return e.Where("org_id=?", org.ID).Find(&org.Teams)
 | 
						return e.Where("org_id=?", org.ID).OrderBy("CASE WHEN name LIKE '" + OWNER_TEAM + "' THEN '' ELSE name END").Find(&org.Teams)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// GetTeams returns all teams that belong to organization.
 | 
					// GetTeams returns all teams that belong to organization.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user