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

'RestrictedQuerySet' object has no attribute 'net_in' #269

Closed
lvrfrc87 opened this issue Sep 10, 2024 · 3 comments · Fixed by #289
Closed

'RestrictedQuerySet' object has no attribute 'net_in' #269

lvrfrc87 opened this issue Sep 10, 2024 · 3 comments · Fixed by #289

Comments

@lvrfrc87
Copy link

lvrfrc87 commented Sep 10, 2024

Environment

  • Python version: 3.11.9
  • Nautobot version: 2.2.7
  • nautobot-firewall-models version: 2.0.3
  • PSQL version: 15.4

Expected Behavior

When using /api/plugins/firewall/ip-range/?start_address=70.70.70.0 I would expect Nautobot to return all the IP in IP Range page that are within that range
This also happening with start_address and end_address as per screenshot

Observed Behavior

{
  "error": "'RestrictedQuerySet' object has no attribute 'net_in'",
  "exception": "AttributeError",
  "nautobot_version": "2.2.7",
  "python_version": "3.11.9"
}

This is happing in UI as well as API

Steps to Reproduce

Screenshot 2024-09-10 at 15 09 34
@jdrew82
Copy link
Contributor

jdrew82 commented Sep 10, 2024

This is due to the IPRange model not supporting the net_in lookup filter. We would need to essentially recreate this from core NB for the model.

@gsnider2195
Copy link
Contributor

That filter probably just needs to be removed for now then?

@lvrfrc87
Copy link
Author

What could be a good implementation or workaround ti achieve the same result as net_in

jdrew82 added a commit that referenced this issue Jan 15, 2025
Removed the filter_address method from IPRangeFilterSet (Issue #269)
@jdrew82 jdrew82 mentioned this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants