openwisp / openwisp/django-flat-json-widget

Forced cast to string type

Open
#8 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
71
Forks
27
Avg merge
1h 8m
Merged PRs (30d)
6

Description

Friends, this widget works with the JSON type. If you do not explicitly specify a quoted string, then you do not need to interpret the value as a string.
Here is an example that actually causes an error in the application due to forced casting of a value to a string type.
Input: key field max_length, value 255. Result
{"max_length": "255"}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides no file or test path. Reproduce the shown max_length=255 input, then inspect the widget’s handling of JSON values. Done means numeric values remain numbers while explicitly quoted values remain strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.