Skip to content

Running Schema.purge on empty table fails #4664

Closed

Description

@mullwaden

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

Activity

  1. added
    type:bugImpaired feature or lacking behavior that is likely assumed
    on Mar 21, 2018
  2. dplewis commented on Mar 23, 2018

    @dplewis
    Member

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

  3. mullwaden commented on Mar 26, 2018

    @mullwaden
    Author

    Looks like that is the issue, nice solve, thanks

  4. dplewis commented on Mar 26, 2018

    @dplewis
    Member

    No Problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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