forked from applegrew/django-select2
-
-
Notifications
You must be signed in to change notification settings - Fork 57
Closed as not planned
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Bug Description
Heya, thanks a lot for the project, it's awesome! I'm having an issue with the selects throwing this exception on prod, but the problem is that I've been unable to pinpoint a pattern. On dev, the problem never occours.
For reference, I'm using it like this (I need it to be rendered without an explicit form):
widget = EventCharacterS2Widget(attrs={"id": "char_finder"})
widget.set_event(ctx["event"])
ctx["char_finder"] = widget.render(name="char_finder", value="")
and defined as:
class EventCharacterS2:
search_fields = [
"number__icontains",
"name__icontains",
"teaser__icontains",
"title__icontains",
]
def set_event(self, event):
self.event = event
def get_queryset(self):
return self.event.get_elements(Character)
class EventCharacterS2WidgetMulti(EventCharacterS2, s2forms.ModelSelect2MultipleWidget):
pass
class EventCharacterS2Widget(EventCharacterS2, s2forms.ModelSelect2Widget):
pass
(I wanted to reuse the common configuration).
Sorry if I am unable to provide further info to reproduce it; what can I try to understand better the situation?
Steps to Reproduce
Happening intermittently, no clear pattern found
Expected Behavior
No exception thrown
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation