#28589: When saving in admin, readonly fields are potentially overwritten
-------------------------------------+-------------------------------------
Reporter: Fingal Plumpton | Owner: Fingal
Type: | Plumpton
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Admin SQL Overwrite | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Alexander Lazarević):
So for what it's worth, this seems to be still the case in
5.1.dev20240112204018:
{{{
UPDATE "empty_somemodel"
SET "name" = '''wowzer'',
"description" = '''''',
"choices" = '''''',
"random_tag" = '''9436''',
"date" = '''2024-01-01''',
"time" = '''11:18:48''',
"boolean" = 'False',
"decimal" = '''0.01''',
"floating" = '1.0',
"json" = '''{}'''
WHERE "empty_somemodel"."id" = '1'
}}}
{{{
class SomeModel(models.Model):
...
random_tag = models.CharField(null=False, max_length=32,
default=random_text, editable=False)
...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28589#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018d0b451abd-a9f7ef74-36f8-400f-bf3a-efce49f7460e-000000%40eu-central-1.amazonses.com.