Replies: 3 comments
|
Hi @nizarcan, Thanks for reaching out. I am working on a bigger patch for the underlying issue. Do you have a full stack trace for me? Thanks |
|
Hey! Sure, here's the full stack trace: and here's the django dependencies I have: |
|
Hello again, And thank you for sharing the trace. Sadly, the issue seems to be related to the usage of internal APIs in I know this maybe wasn't the answer you are looking for. However, the package relies on the very security bug that we fixed. Best |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug Description
After upgrading to django-select2 v8.4.1,
ModelSelect2MultipleWidgetand otherHeavySelect2Mixinsubclasses throwAttributeError: 'ModelSelect2MultipleWidget' object has no attribute 'uuid'when rendering. This appears to be a regression introduced by the security fix in v8.4.1The issue occurs because uuid generation was moved from
__init__tobuild_attrsinv8.4.1, but_get_cache_keyis called earlier in the render flow (render()→set_to_cache()→_get_cache_key())Steps to Reproduce
1- Install django-select2 v8.4.1
2- Create any widget inheriting from ModelSelect2MultipleWidget or HeavySelect2Mixin
3- Try to render the widget in a form
Expected Behavior
Widget should render without errors, as it did in v8.4.0
All reactions