mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
In the admin, when selecting related objects via the helpers defined in `RelatedObjectLookups.js`, the `dismissRelatedLookupPopup` function was attempting to access `window.relatedWindows`, which does not exist in real execution, causing related lookup popups to remain open. This change ensures that this code correctly accesses the module-local `relatedWindows` by explicitly assigning it to `window.relatedWindows`. Regression in91bebf1adb. Thanks Matthias Kestenholz for the report, the fix ideas, and testing. Co-authored-by: Matthias Kestenholz <mk@feinheit.ch> Backport ofa245604277from main.
This commit is contained in:
@@ -8,7 +8,6 @@ QUnit.module('admin.RelatedObjectLookups', {
|
||||
<input type="text" id="test_id" name="test" />
|
||||
<input type="text" id="many_test_id" name="many_test" class="vManyToManyRawIdAdminField" />
|
||||
`);
|
||||
window.relatedWindows = window.relatedWindows || [];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user