mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug * upgrade packages * fix fmt * fix Consistency * fix tests
This commit is contained in:
		
							
								
								
									
										8
									
								
								vendor/github.com/go-xorm/xorm/session_find.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/go-xorm/xorm/session_find.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -10,8 +10,8 @@ import ( | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/go-xorm/builder" | ||||
| 	"github.com/go-xorm/core" | ||||
| 	"xorm.io/builder" | ||||
| 	"xorm.io/core" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| @@ -63,6 +63,10 @@ func (session *Session) FindAndCount(rowsSlicePtr interface{}, condiBean ...inte | ||||
| } | ||||
|  | ||||
| func (session *Session) find(rowsSlicePtr interface{}, condiBean ...interface{}) error { | ||||
| 	if session.statement.lastError != nil { | ||||
| 		return session.statement.lastError | ||||
| 	} | ||||
|  | ||||
| 	sliceValue := reflect.Indirect(reflect.ValueOf(rowsSlicePtr)) | ||||
| 	if sliceValue.Kind() != reflect.Slice && sliceValue.Kind() != reflect.Map { | ||||
| 		return errors.New("needs a pointer to a slice or a map") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user