Skip to content

Running Schema.purge on empty table fails #4664

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

Closed
mullwaden opened this issue Mar 20, 2018 · 3 comments · Fixed by #4676
Closed

Running Schema.purge on empty table fails #4664

mullwaden opened this issue Mar 20, 2018 · 3 comments · Fixed by #4676
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@mullwaden
Copy link

mullwaden commented Mar 20, 2018

Issue Description

Running purge on a schema with no data rows fails

Steps to reproduce

Run the following code for some schema. If there are no rows in the database it will fail

const schema = new Parse.Schema('Machine');
schema.purge();

Expected Results

If the table has no rows then nothing should happen

Actual Outcome

Where my script that runs the code above gives an unhandledPromiseRejectionWarning.

My server gives the following error:

[1] error: Error generating response. ParseError { code: 101, message: 'Object not found.' } code=101, message=Object not found.
[1] error: Object not found. code=101, message=Object not found.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 1.11.1
    • Operating System: Windows 10
    • Localhost
  • Database

    • postgreSQL 9.6.5

Logs/Trace

See above

@dplewis dplewis added the type:bug Impaired feature or lacking behavior that is likely assumed label Mar 21, 2018
@dplewis
Copy link
Member

dplewis commented Mar 23, 2018

Thanks for reporting. I wasn't able to replicate your error exactly but I did find an error. I'll submit a fix soon.

@mullwaden
Copy link
Author

Looks like that is the issue, nice solve, thanks

@dplewis
Copy link
Member

dplewis commented Mar 26, 2018

No Problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants