Skip to content

Commit 3f29f95

Browse files
committed
More cleanup, no functional changes
1 parent b8e1589 commit 3f29f95

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

manager.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ def make_atom(self, child, qn):
4141
table_alias, name, db_type, lookup_type, value_annot, params = child
4242
field_sql = '%s.%s' % (qn(table_alias), qn(name))
4343

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']:
44+
if db_type not in ['inet', 'cidr']:
4845
return super(NetWhere, self).make_atom(child, qn)
46+
elif lookup_type in NET_TERMS_MAPPING:
47+
lookup_type = NET_TERMS_MAPPING[lookup_type]
48+
child = (table_alias, name, db_type, lookup_type, value_annot, params)
49+
return self.make_atom(child, qn)
4950
elif lookup_type in NET_TERMS:
5051
return (NET_TERMS[lookup_type] % field_sql, params)
5152
elif lookup_type == 'in':

0 commit comments

Comments
 (0)