Skip to content

$slice doesn't parse inner expressions #818

Open

Description

@JPDevelop

When using slice with an inner expression in the 2 last array indexes, it doesn't parse them.

How to reproduce:

{
$slice: ["$array", {$add: [1, 2]}, {$add: [1, 1]}]
}

The following exception is thrown:

pymongo.errors.OperationFailure: Second argument to $slice must be numeric, but is of type: <class 'dict'>

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