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 |
Beta Was this translation helpful? Give feedback.
-
Hey! Sure, here's the full stack trace:
and here's the django dependencies I have:
|
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
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,
ModelSelect2MultipleWidget
and otherHeavySelect2Mixin
subclasses 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_attrs
inv8.4.1
, but_get_cache_key
is 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
Beta Was this translation helpful? Give feedback.
All reactions