#30014: Initialising disabled ModelChoiceField yields 'Select a valid
choice'-error
despite initialised option being valid
-------------------------------------+-------------------------------------
Reporter: thoha | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 1.11
Severity: Normal | Resolution: needsinfo
Keywords: forms, disabled | Triage Stage:
field, error, to_field_name | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by thoha):
It seems to only occur when I try to use get_initial in views.py. If I use
a custom init in forms.py I can do whatever I want, but get_initial tends
to be glitchy. I'm afraid I can't get any closer than that.
Even if the problem with get_initial can't be tracked down, fixing the
unhelpful error message itself would be an improvement, too.
--
Ticket URL: <https://code.djangoproject.com/ticket/30014#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 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/063.45a537da7650d60de541dd45260fcbac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.