Skip to content

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

@Alxe

Description

@Alxe

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.

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