[Django] #33871: Bug that occurs when using JSONField and TabularInline

13 views
Skip to first unread message

Django

unread,
Jul 27, 2022, 6:22:28 PM7/27/22
to django-...@googlegroups.com
#33871: Bug that occurs when using JSONField and TabularInline
-------------------------------------+-------------------------------------
Reporter: raphaelwb | Owner: nobody
Type: | Status: new
Uncategorized |
Component: | Version: 4.0
contrib.admin |
Severity: Release | Keywords: JSONField
blocker | TabularInline
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Apparently the JSONField field modification in a TabularInline is ignored
after a validation error.

To reproduce I attached the generated project based of the basic Django
tutorial with changes to use a JSONField and TabularInline

user: admin
password: admin

Sequence:

01. Edit the Question
02. Change both Choice Text to "test"
03. Change both Text (Json) to ["test"]
04. Save
05. Edit again
06. Change the two Text (Json) to ["test 123"]
07. Delete the Choice Text field of the second item
08. Save
09. Error message will appear
09. Set the Choice Text field to "test 123" of the second item
10. Save
11. Edit again, only the second item field was changed to ["test 123"]

--
Ticket URL: <https://code.djangoproject.com/ticket/33871>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 27, 2022, 6:23:28 PM7/27/22
to django-...@googlegroups.com
#33871: Bug that occurs when using JSONField and TabularInline
-------------------------------------+-------------------------------------
Reporter: raphaelwb | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: JSONField | Triage Stage:
TabularInline | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by raphaelwb):

* Attachment "djangoInlineBug.zip" added.

Django

unread,
Jul 27, 2022, 6:26:27 PM7/27/22
to django-...@googlegroups.com
#33871: Bug that occurs when using JSONField and TabularInline
-------------------------------------+-------------------------------------
Reporter: Raphael WInckler de | Owner: nobody
Bettio |
Type: Bug | Status: new

Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: JSONField | Triage Stage:
TabularInline | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Raphael WInckler de Bettio):

* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/33871#comment:1>

Django

unread,
Jul 27, 2022, 6:30:09 PM7/27/22
to django-...@googlegroups.com
#33871: Bug that occurs when using JSONField and TabularInline
-------------------------------------+-------------------------------------
Reporter: Raphael WInckler de | Owner: nobody
Bettio |
Type: Bug | Status: new
Component: contrib.admin | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: JSONField | Triage Stage:
TabularInline | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Raphael WInckler de Bettio:

Old description:

> Apparently the JSONField field modification in a TabularInline is ignored
> after a validation error.
>
> To reproduce I attached the generated project based of the basic Django
> tutorial with changes to use a JSONField and TabularInline
>
> user: admin
> password: admin
>
> Sequence:
>
> 01. Edit the Question
> 02. Change both Choice Text to "test"
> 03. Change both Text (Json) to ["test"]
> 04. Save
> 05. Edit again
> 06. Change the two Text (Json) to ["test 123"]
> 07. Delete the Choice Text field of the second item
> 08. Save
> 09. Error message will appear
> 09. Set the Choice Text field to "test 123" of the second item
> 10. Save
> 11. Edit again, only the second item field was changed to ["test 123"]

New description:

Apparently the JSONField field modification in a TabularInline is ignored
after a validation error.

To reproduce I attached the generated project based of the basic Django
tutorial with changes to use a JSONField and TabularInline

user: admin
password: admin

Sequence:

01. Edit the Question
02. Change both Choice Text to "test"
03. Change both Text (Json) to ['test']
04. Save
05. Edit again
06. Change the two Text (Json) to ["test 123"]
07. Delete the Choice Text field of the second item
08. Save
09. Error message will appear
09. Set the Choice Text field to "test 123" of the second item
10. Save
11. Edit again, only the second item field was changed to ["test 123"]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/33871#comment:2>

Django

unread,
Jul 27, 2022, 6:30:39 PM7/27/22
to django-...@googlegroups.com

Old description:

New description:

user: admin
password: admin

Sequence:

--

--
Ticket URL: <https://code.djangoproject.com/ticket/33871#comment:3>

Django

unread,
Jul 27, 2022, 6:37:30 PM7/27/22
to django-...@googlegroups.com

Old description:

New description:

user: admin
password: admin

Sequence:

01. Edit the Question
02. Change both Text field to "test"
03. Change both JsonField to 'test' (Any Valid Json)


04. Save
05. Edit again

06. Change both two JsonField to 'test 123' (Any Valid Json)
07. Delete text from Text field of the second item


08. Save
09. Error message will appear
09. Set the Choice Text field to 'test 123' of the second item
10. Save

11. Edit again, only the second JsonField was changed to 'test 123' (Any
Valid Json)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/33871#comment:4>

Reply all
Reply to author
Forward
0 new messages