parent
7ad5a3a5d6
commit
c410001f8d
|
@ -41,7 +41,10 @@ func (q *Model) Values(i interface{}) url.Values {
|
|||
iVal := reflect.ValueOf(i).Elem()
|
||||
typ := iVal.Type()
|
||||
for i := 0; i < iVal.NumField(); i++ {
|
||||
values.Set(strings.ToLower(typ.Field(i).Tag.Get("json")), PyConvert(iVal.Field(i)))
|
||||
tag := typ.Field(i).Tag.Get("json")
|
||||
if tag != "-" {
|
||||
values.Set(strings.ToLower(tag), PyConvert(iVal.Field(i)))
|
||||
}
|
||||
}
|
||||
return values
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue