-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
afterFind breaks aggregate #4594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
type:bug
Impaired feature or lacking behavior that is likely assumed
Comments
@flovilmart What do you think? Should Aggregate ignore AfterFind or pass in values into request.objects? |
Yep we should probably not run afterFind after and aggregation. Does that make sense for you @dblythy ? |
Sounds good @flovilmart. As it's restricted to require masterKey, any stripping/sensitive or modified fields could be written in the cloud aggregate function. |
Thank you @dplewis! |
This was referenced Aug 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Database
The text was updated successfully, but these errors were encountered: