Skip to content

Unordered MFAMethod causing pagination warning during tests #195

Open
@smurphles

Description

@smurphles

Describe the bug
Warning when running tests due to no list ordering.

To Reproduce
Steps to reproduce the behavior:

  1. Hitting this endpoint in tests: /mfa/user-active-methods/
  2. Yields this error: django.core.paginator.UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'authorization.models.MFAMethod'> QuerySet.

Expected behavior
The endpoint should have an ordering - or the model should have default ordering.

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