1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3944: Fix AttributeError exception when viewing prefixes list

This commit is contained in:
Jeremy Stretch
2020-01-16 21:39:46 -05:00
parent 604924231a
commit 5369aef971
3 changed files with 16 additions and 6 deletions

View File

@@ -103,6 +103,10 @@ class NetHost(Lookup):
class NetIn(Lookup):
lookup_name = 'net_in'
def get_prep_lookup(self):
# Don't cast the query value to a netaddr object, since it may or may not include a mask.
return self.rhs
def as_sql(self, qn, connection):
lhs, lhs_params = self.process_lhs(qn, connection)
rhs, rhs_params = self.process_rhs(qn, connection)