We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8e1589 commit 3f29f95Copy full SHA for 3f29f95
manager.py
@@ -41,11 +41,12 @@ def make_atom(self, child, qn):
41
table_alias, name, db_type, lookup_type, value_annot, params = child
42
field_sql = '%s.%s' % (qn(table_alias), qn(name))
43
44
- if lookup_type in NET_TERMS_MAPPING:
45
- return self.make_atom((table_alias, name, db_type,
46
- NET_TERMS_MAPPING[lookup_type], value_annot, params), qn)
47
- elif db_type not in ['inet', 'cidr']:
+ if db_type not in ['inet', 'cidr']:
48
return super(NetWhere, self).make_atom(child, qn)
+ elif lookup_type in NET_TERMS_MAPPING:
+ lookup_type = NET_TERMS_MAPPING[lookup_type]
+ child = (table_alias, name, db_type, lookup_type, value_annot, params)
49
+ return self.make_atom(child, qn)
50
elif lookup_type in NET_TERMS:
51
return (NET_TERMS[lookup_type] % field_sql, params)
52
elif lookup_type == 'in':
0 commit comments