mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Remove ajax_select from counters
This commit is contained in:
@ -49,7 +49,15 @@ class AutoCompleteSelectMixin:
|
||||
context["selected"] = [
|
||||
self.schema.from_orm(obj).json()
|
||||
for obj in self.model.objects.filter(
|
||||
**{f"{self.pk}__in": context["widget"]["value"]}
|
||||
**{
|
||||
f"{self.pk}__in": [
|
||||
pk
|
||||
for pk in context["widget"]["value"]
|
||||
if str(
|
||||
pk
|
||||
).isdigit() # We filter empty values for create views
|
||||
]
|
||||
}
|
||||
).all()
|
||||
]
|
||||
return context
|
||||
|
Reference in New Issue
Block a user