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

ConfigContext does not validate that JSON data is an object #2443

Closed
jeremystretch opened this issue Sep 18, 2018 · 0 comments
Closed

ConfigContext does not validate that JSON data is an object #2443

jeremystretch opened this issue Sep 18, 2018 · 0 comments
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.4

Steps to Reproduce

  1. Create a new config context. Do not assign it to anything. (It will apply to all devices/VMs.)
  2. Enter 1 as the data and save the config context.
  3. Retrieve the rendered config context for a device.

Expected Behavior

Creating the config context with non-dictionary data should raise a validation error.

Observed Behavior

The config context was saved with the integer value. This causes a TypeError exception when attempting to retrieve the rendered context (either via the UI or API).

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Sep 18, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant