Skip to content

afterFind breaks aggregate #4594

@dblythy

Description

@dblythy

Issue Description

Using aggregate works without afterFind set on class. When afterFind is set, internal server error. Even trying to pass response.success(request.objects); straight away still breaks.

Steps to reproduce

Perform an aggregate such as .distinct on a class with Parse.Cloud.afterFind trigger.

Expected Results

Aggregate to ignore after find as objects are not parse.objects; or values to be passed in request.objects.

Actual Outcome

Internal server error. Cannot create property 'className' on string.

Environment Setup

  • Server

    • parse-server version: 2.7.2
    • Localhost or remote server: localhost
  • Database

    • MongoDB version: 3.2
    • Localhost or remote server: localhost

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions