Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 21, 2021
1 parent 32b1dfd commit b41ec65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/gorm_persistence_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,11 @@ func (afo *GormAdminFilterObjects) Search(field *Field, searchString string) {
fullGormOperatorContext := NewGormOperatorContext(afo.GetFullQuerySet(), model)
paginatedGormOperatorContext := NewGormOperatorContext(afo.GetPaginatedQuerySet(), model1)
for searchField := range adminPage.SearchFields.GetAll() {
fieldType1 := searchField.Field.FieldType.Kind()
if searchField.Field.FieldType.Kind() == reflect.Struct {
afo.Search(searchField.Field, searchString)
continue
} else if (fieldType == reflect.Uint) || (fieldType == reflect.Uint64) || (fieldType == reflect.Uint32) || (fieldType == reflect.Int64) || (fieldType == reflect.Int) || (fieldType == reflect.Int32) || (fieldType == reflect.Float32) || (fieldType == reflect.Float64) {
} else if (fieldType1 == reflect.Uint) || (fieldType1 == reflect.Uint64) || (fieldType1 == reflect.Uint32) || (fieldType1 == reflect.Int64) || (fieldType1 == reflect.Int) || (fieldType1 == reflect.Int32) || (fieldType1 == reflect.Float32) || (fieldType1 == reflect.Float64) {
operator := ExactGormOperator{}
operator.Build(afo.GetUadminDatabase().Adapter, fullGormOperatorContext, searchField.Field, searchString, &SQLConditionBuilder{Type: "or"})
operator = ExactGormOperator{}
Expand Down

0 comments on commit b41ec65

Please sign in to comment.