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

JSONField not set to null after being set to empty #26

Open
dgrant opened this issue Aug 8, 2019 · 0 comments
Open

JSONField not set to null after being set to empty #26

dgrant opened this issue Aug 8, 2019 · 0 comments

Comments

@dgrant
Copy link

dgrant commented Aug 8, 2019

  • django-json-widget version: master/325ad3027b3915a2d41552c6e113453a9e56dd05 and 0.2.0
  • Django version: 2.2.4
  • Python version: 3.7.2
  • Operating System: Debian Stretch

Description

To reproduce:

  • Enable JSONEditorWidget on a JSONField in admin
  • Set JSONField value in admin to some non-empty json.
  • Save model in admin
  • Set the JSONField to empty by clearing the contents of the widget completely.
  • Save model in admin

What happens: The field does not get changed, it is still set to the original non-empty json and no error is displayed.

What I expected to happen: I expected the field to get set to null/None or I expected to at least get an error that the update to the field failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant