mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix bug on pull requests when transfer head repository (#8564)
* fix bug on pull requests when transfer head repository * add migration and fix lint * fix tests and add a cache check on LoadBaseRepo
This commit is contained in:
		@@ -994,10 +994,6 @@ func ChangeUserName(u *User, newUserName string) (err error) {
 | 
			
		||||
		return ErrUserAlreadyExist{newUserName}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = ChangeUsernameInPullRequests(u.Name, newUserName); err != nil {
 | 
			
		||||
		return fmt.Errorf("ChangeUsernameInPullRequests: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Do not fail if directory does not exist
 | 
			
		||||
	if err = os.Rename(UserPath(u.Name), UserPath(newUserName)); err != nil && !os.IsNotExist(err) {
 | 
			
		||||
		return fmt.Errorf("Rename user directory: %v", err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user