Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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