Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textual evaluation filters don't work for IP fields #1619

Closed
jeremystretch opened this issue Oct 18, 2017 · 0 comments
Closed

Textual evaluation filters don't work for IP fields #1619

jeremystretch opened this issue Oct 18, 2017 · 0 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.4.3
  • NetBox version: 2.2.2

Description

Text-based search filters (startswith, endswith, regex, and their case-insensitive counterparts) are not properly evaluated for IPNetworkFields and IPAddressFields:

>>> from netaddr import IPNetwork
>>> IPAddress(address=IPNetwork('192.0.2.1/24')).save()
>>> IPAddress(address=IPNetwork('192.0.2.2/24')).save()
>>> IPAddress(address=IPNetwork('192.0.2.3/24')).save()
>>> IPAddress.objects.filter(address__startswith='192.0.2')
<QuerySet []>
@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Oct 18, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant