File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -148,19 +148,16 @@ def filter_args(self):
148
148
if self ._type ._meta .filter_fields :
149
149
for field , filter_collection in self ._type ._meta .filter_fields .items ():
150
150
for each in filter_collection :
151
- if each == 'max_distance' and str (self ._type ._meta .fields [field ].type ) == 'PointFieldType' :
152
- filter_type = graphene .Int
153
- else :
154
- filter_type = getattr (
155
- graphene ,
156
- str (self ._type ._meta .fields [field ].type ).replace ("!" , "" ),
157
- )
158
-
151
+ filter_type = getattr (
152
+ graphene ,
153
+ str (self ._type ._meta .fields [field ].type ).replace ("!" , "" ),
154
+ )
159
155
# handle special cases
160
156
advanced_filter_types = {
161
157
"in" : graphene .List (filter_type ),
162
158
"nin" : graphene .List (filter_type ),
163
159
"all" : graphene .List (filter_type ),
160
+ "max_distance" : graphene .Int
164
161
}
165
162
166
163
filter_type = advanced_filter_types .get (each , filter_type )
You can’t perform that action at this time.
0 commit comments