--
Ticket URL: <https://code.djangoproject.com/ticket/18501>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Could you provide a test case ? Or at least a minimal code sample and
instructions to reproduce the problem?
That would be much easier for us than trying to rebuild an example from
your description.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:1>
Comment (by msopacua):
Ok, so I'm unable to write a proper test case, because the ModelForm class
does not expose the bug but the admin change form does. So the admin does
something special, that I'm unable to figure out that exposes this bug.
Therefore I've provided an app "devices", that is a copy of the models
involved reduced to the size that they still expose the bug. The test case
therein as said, works properly. However, if one adds 'devices' to the
installed apps of a project, load the fixture and then browse to
http://localhost/admin/devices/devicepciid/1/ you will see that the vendor
is not selected. Applying the patch, reloading application and refreshing
the browser will show that the vendor is selected. I suspect the formfield
callback to be the culprit but can't really figure out how to make this
into a proper test case.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:2>
Comment (by lrekucki):
This looks similar to #17214 and #17122.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:3>
* stage: Unreviewed => Accepted
Comment:
Indeed, I could easily reproduce the problem with the example provided.
A quick scan of the models definition doesn't reveal anything suspicious.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:4>
* cc: maa@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:5>
* cc: maa@… (removed)
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:6>
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:7>
* status: new => closed
* resolution: => needsinfo
Comment:
As the sample project uses the deprecated `SubfieldBase` class to
construct the custom field, I am going to close this ticket as
"needsinfo". I suspect this issue may have been fixed since this ticket
was created as `UUIDField` has been introduced into core and we fixed
several related bugs.
Feel free to reopen with more details if it's still an issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:8>