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

available-prefixes deserialization causes validation to run multiple times #6669

Open
lampwins opened this issue Dec 16, 2024 · 2 comments
Open
Assignees
Labels
ms type: bug Something isn't working as expected

Comments

@lampwins
Copy link
Member

Environment

  • Nautobot version (Docker tag too if applicable): 2.3
  • Python version:
  • Database platform, version:
  • Middleware(s):

Steps to Reproduce

  1. Create a prefix via available-prefixes
  2. Have a custom validator setup on prefix, that relies on the .prefix or .ancestors() methods

Expected Behavior

Validation to run only once, with all properties and data populated

Observed Behavior

Validation is run multiple times, with the object in various partial states.

@lampwins lampwins added type: bug Something isn't working as expected triage This issue is new and has not been reviewed. ms and removed triage This issue is new and has not been reviewed. labels Dec 16, 2024
@lampwins
Copy link
Member Author

We think this is due to deserialization happening in multiple stages, to validate then actually create the object.

@lampwins
Copy link
Member Author

Need to also check available-ips and available-vlans endpoints.

@HanlinMiao HanlinMiao self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ms type: bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants