Skip to content

AttributeError: 'CommandCursor' object has no attribute 'to_list' #924

Description

@alejnp

The function pymongo.command_cursor.CommandCursor.to_list is not present in mongomock.

>       return aggregation.to_list()
E       AttributeError: 'CommandCursor' object has no attribute 'to_list'

This can easily be worked-around by using list(aggregation), but using the n parameters could be trickier depending on the expected behavior. I'll consider submitting a PR.

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