You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using search for related fields that end in multiple records, binder may return the same record more than once, depending on circumstances.
The same issue also happens when using a Q() object in a permission filter that traverses a relation into a "many" side.
Example (untested yet):
Add searches = ['animals__name__icontains'] to CaretakerView
Set up a caretaker with multiple animals under his care
Search for a substring that contains multiple animals
Result has more than one caretaker record with the same id
The text was updated successfully, but these errors were encountered:
sjamaan
changed the title
searches on related fields (can) cause duplicate results
Searches on related fields (can) cause duplicate results
Jan 7, 2019
When using
search
for related fields that end in multiple records, binder may return the same record more than once, depending on circumstances.The same issue also happens when using a
Q()
object in a permission filter that traverses a relation into a "many" side.Example (untested yet):
searches = ['animals__name__icontains']
toCaretakerView
id
The text was updated successfully, but these errors were encountered: