#28222: Django 1.11 update_or_create field validation results in different
behaviours between create and update_or_create
-------------------------------+--------------------------------------
Reporter: Alex Mykyta | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution:
Keywords: 1.11 | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Alex Mykyta:
Old description:
> This is an issue related to #27118. Anthony King commented on it but that
> issue is closed so I am opening a new one. The field validation
> introduced in 1.11 `update_or_create` will throw a FieldError if a
> `defaults` argument contains a value that is set through an
> `@property.setter` on that model. On the other hand `create` continues to
> function correctly. Ideally they'd behave consistently.
>
> Here is an example https://dpaste.de/UORC
New description:
This is an issue related to #27118. Anthony King commented on it but that
issue is closed so I am opening a new one. The field validation introduced
in 1.11 `update_or_create` will throw a `FieldError` if a `defaults`
argument contains a value that is set through an `@property.setter` on
that model. On the other hand `create` continues to function correctly.
Ideally they'd behave consistently.
Here is an example https://dpaste.de/UORC
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28222#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.10f032947dfcddda6ef8a81abcb13979%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.