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

Wrong relationship filter are not throwing a Validation Error #396

Closed
dgarros opened this issue May 1, 2021 · 1 comment · Fixed by #424
Closed

Wrong relationship filter are not throwing a Validation Error #396

dgarros opened this issue May 1, 2021 · 1 comment · Fixed by #424
Assignees
Labels
type: bug Something isn't working as expected

Comments

@dgarros
Copy link
Contributor

dgarros commented May 1, 2021

Environment

  • Python version: 3.7
  • Nautobot version: 1.0.0

Steps to Reproduce

  1. Create a relationship from dcim.device to ipam.vlan
  2. Configure the source_filter field as { "role": 98 }
  3. Save the relationship

The same issue exist for destination filter

Expected Behavior

The form should flag the source_filter as invalid as role must be a list of string { "role": [String] }

Observed Behavior

The form is saved without error

@dgarros
Copy link
Contributor Author

dgarros commented May 1, 2021

Please assign this one to me, I have a fix for it already

@glennmatthews glennmatthews added the type: bug Something isn't working as expected label May 3, 2021
dgarros added a commit to dgarros/nautobot that referenced this issue May 7, 2021
dgarros added a commit to dgarros/nautobot that referenced this issue May 12, 2021
dgarros added a commit to dgarros/nautobot that referenced this issue May 19, 2021
glennmatthews added a commit that referenced this issue May 25, 2021
* Fix for #396, leverate filterset error messages for more accurate checking

* Update nautobot/extras/models/relationships.py

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>

* Check error message in unit tests for relaltionships

* Update filter key to trigger proper error

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
glennmatthews added a commit that referenced this issue May 25, 2021
glennmatthews added a commit that referenced this issue May 25, 2021
* Bring changelog up to date

* Update changelog to include #436

* Update changelog for #14, #474, #396
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2021
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants