#25980: Wrong handling of initial value on disabled ModelMultipleChoiceField
-------------------------------+--------------------------------------
     Reporter:  karyon         |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.9
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by timgraham):

 1. As I noted on the pull request the
 
[https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.ModelMultipleChoiceField
 documentation says], "Validates that every id in the given list of values
 exists in the queryset." so my understanding is that you should provide a
 list of ids for the initial values instead of a queryset.

 2. I don't think it's important that providing an incorrect initial type
 results in inconsistent behavior.

 3. `ModelMultipleChoiceField.clean()` returns model instances. Quoting the
 docs again, "Normalizes to: A `QuerySet` of model instances."

 Maybe some documentation clarifications would be enough to resolve this
 ticket. What do you think?

--
Ticket URL: <https://code.djangoproject.com/ticket/25980#comment:8>
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/064.ba04b4ff983cec49f4c502c511e645c5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to