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

Circuits cannot be filtered by location #3616

Closed
Phill93 opened this issue Apr 19, 2023 · 4 comments · Fixed by #3764
Closed

Circuits cannot be filtered by location #3616

Phill93 opened this issue Apr 19, 2023 · 4 comments · Fixed by #3764
Assignees
Labels
type: bug Something isn't working as expected

Comments

@Phill93
Copy link

Phill93 commented Apr 19, 2023

Environment

  • Nautobot version (Docker tag too if applicable): 1.5.16
  • Python version: 3.9.2
  • Database platform, version: Postgres 13.9
  • Middleware(s): None

Steps to Reproduce

  1. Create a Location
  2. Create Circuits and assign them to the location
  3. Try to filter the Circuits list with the location

Expected Behavior

A list of circuits assigned to this location

Observed Behavior

<class 'django.core.exceptions.FieldError'>

Unsupported lookup 'slug' for AutoSlugField or join on the field not permitted.

Python version: 3.9.2
Nautobot version: 1.5.16
@bryanculver bryanculver added the type: bug Something isn't working as expected label Apr 19, 2023
@glennmatthews
Copy link
Contributor

Thanks for the report! Confirmed reproducible on demo.nautobot.com.

@glennmatthews
Copy link
Contributor

Interestingly appears to not be an issue in next as far as I can tell.

@glennmatthews
Copy link
Contributor

As a guess the issue may be here:

https://github.com/nautobot/nautobot/blob/develop/nautobot/circuits/filters.py#L157

terminations__location__slug should probably be just terminations__location.

It also looks like we're missing coverage for this filter in nautobot/circuits/tests/test_filters.py in 1.5.x - this issue was fixed and test coverage was added in next by #3131.

@Phill93
Copy link
Author

Phill93 commented Apr 19, 2023

Is there a release date for next?

@HanlinMiao HanlinMiao self-assigned this May 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants