#32013: Field choice attribute returns different objects in forms.
---------------------------+--------------------------------------
     Reporter:  Jaap Roes  |                    Owner:  nobody
         Type:  Bug        |                   Status:  closed
    Component:  Forms      |                  Version:  3.1
     Severity:  Normal     |               Resolution:  invalid
     Keywords:             |             Triage Stage:  Unreviewed
    Has patch:  0          |      Needs documentation:  0
  Needs tests:  0          |  Patch needs improvement:  0
Easy pickings:  0          |                    UI/UX:  0
---------------------------+--------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 I closed it because we will not revert
 67ea35df52f2e29bafca8881e4f356934061644e and we can add small backwards
 incompatible note that `Refs` to this ticket.

 > Our tests don't complain, but that might just be because we're not
 covering/asserting deep enough.

 It shouldn't be bad because `ModelChoiceIteratorValue` defines `__eq__()`
 which compares `value`. Also, as far as I'm aware overriding `choices` for
 `forms.ModelMultipleChoiceField` and `forms.ModelChoiceField` is not a
 documented pattern I would rather override `.queryset`, see
 [https://docs.djangoproject.com/en/3.1/ref/forms/fields/#fields-which-
 handle-relationships Fields which handle relationship].

 > Or should we audit the entire codebase to see this new
 ModelChoiceIteratorValue will break stuff?

 Yes, you should always audit your code when you bump multiple releases.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32013#comment:5>
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/063.c0257ff5ea15bdecd8f27bf2cf6324a2%40djangoproject.com.

Reply via email to