removed unnecessary strings.ToLower
This commit is contained in:
		
							parent
							
								
									4b489b511d
								
							
						
					
					
						commit
						923b791675
					
				| 
						 | 
				
			
			@ -197,7 +197,7 @@ func (f *TextField) ValidateValue(ctx context.Context, app App, record *Record)
 | 
			
		|||
				err := app.DB().
 | 
			
		||||
					Select("(1)").
 | 
			
		||||
					From(record.TableName()).
 | 
			
		||||
					Where(dbx.NewExp("id = {:id} COLLATE NOCASE", dbx.Params{"id": strings.ToLower(newVal)})).
 | 
			
		||||
					Where(dbx.NewExp("id = {:id} COLLATE NOCASE", dbx.Params{"id": newVal})).
 | 
			
		||||
					Limit(1).
 | 
			
		||||
					Row(&exists)
 | 
			
		||||
				if exists > 0 || (err != nil && !errors.Is(err, sql.ErrNoRows)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue