diff options
| author | seanhelvey <sean.helvey@gmail.com> | 2024-12-13 11:56:53 -0800 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-01-22 21:12:23 -0500 |
| commit | b1ffa9a9d78b0c2c5ad6ed5a1d84e380d5cfd010 (patch) | |
| tree | 0fcfd9b90c788e21e58cb9249f4119062b8bfc4e /tests/admin_widgets/tests.py | |
| parent | 3851601b2e080df34fb9227fe5d2fd43af604263 (diff) | |
Fixed #13883 -- Rendered named choice groups with <optgroup> in FilteredSelectMultiple.
This patch adds support for <optgroup>s in FilteredSelectMultiple widgets.
When a popup returns a new object, if the source field contains optgroup
choices, the optgroup is now also included in the response data.
Additionally, this adds error handling for invalid source_model parameters
to prevent crashes and display user-friendly error messages instead.
Co-authored-by: Michael McLarnon <mmclar@gmail.com>
Diffstat (limited to 'tests/admin_widgets/tests.py')
| -rw-r--r-- | tests/admin_widgets/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 7588c2cc32..e0ae5b7747 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -971,7 +971,7 @@ class RelatedFieldWidgetWrapperTests(SimpleTestCase): </select> <a class="related-widget-wrapper-link add-related" id="add_id_stream" data-popup="yes" title="Add another release event" - href="/admin_widgets/releaseevent/add/?_to_field=album&_popup=1"> + href="/admin_widgets/releaseevent/add/?_to_field=album&_popup=1&_source_model=admin_widgets.videostream"> <img src="/static/admin/img/icon-addlink.svg" alt="" width="24" height="24"> </a> </div> |
