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

Store custom field default values as JSON #5400

Closed
jeremystretch opened this issue Dec 1, 2020 · 0 comments
Closed

Store custom field default values as JSON #5400

jeremystretch opened this issue Dec 1, 2020 · 0 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@jeremystretch
Copy link
Member

Environment

  • Python version: 3.6.9
  • NetBox version: 2.10-beta1

Proposed Functionality

The CustomField model's default field should be a JSONField rather than a CharField.

Use Case

Using a JSONField permits the storage of a default value in its native type, and avoids the need for clunky deserialization (e.g. storing the string "false" for a boolean field).

Database Changes

Migrate the default field to a JSONField and update all existing values accordingly.

External Dependencies

None

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user labels Dec 1, 2020
@jeremystretch jeremystretch self-assigned this Dec 1, 2020
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Dec 1, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

1 participant