Skip to content

Searches on related fields (can) cause duplicate results #111

@sjamaan

Description

@sjamaan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions