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

Exception thrown after updating custom field via API #1226

Closed
patrickfish opened this issue May 24, 2017 · 1 comment
Closed

Exception thrown after updating custom field via API #1226

patrickfish opened this issue May 24, 2017 · 1 comment
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@patrickfish
Copy link

Issue type: Bug report

Python version: 2.7.9
NetBox version: 2.0.3

  1. Create custom field (I used a boolean) tied to dcim > site
  2. Do a PUT/POST against a site writing to that custom field, example:
{
  "name": "206",
  "slug": "206",
  "custom_fields":{"anira_ready":true}
}
  1. Attempt to load the site via web browser: $netbox/dcim/sites/206/

Error is:

<type 'exceptions.ValueError'>

invalid literal for int() with base 10: 'True'
@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label May 31, 2017
@jeremystretch
Copy link
Member

This is happening because custom field values are not being properly serialized when entered via the API.

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants