Skip to content

Users can't remove job posts that were made with Manny v1 #239

Open
@pfist

Description

@pfist

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

If someone posted a job or portfolio with Manny v1, they cannot remove it with Manny v2's /remove command. This is because Manny v2 doesn't search the job board channels for the post; it only searches a database, and only posts made with Manny v2 are added to the database.

When the command fails in this way, it logs an error:

The table `public.Job` does not exist in the current database.
    at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
    at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
    at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
    at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:53:22)
    at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
  code: 'P2021',
  clientVersion: '4.3.0',
  meta: { table: 'public.Job' }
}

The column `Portfolio.channel` does not exist in the current database.
    at RequestHandler.handleRequestError (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29754:13)
    at RequestHandler.request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:29737:12)
    at async PrismaClient._request (/home/pfist/bots/manny/node_modules/@prisma/client/runtime/index.js:30709:16)
    at async RemovePost.run (file:///home/pfist/bots/manny/src/commands/job-board/remove-post.js:84:22)
    at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/manny/node_modules/hiei.js/src/commands/CommandHandler.js:110:7) {
  code: 'P2022',
  clientVersion: '4.3.0',
  meta: { column: 'Portfolio.channel' }
}

What you expected

The /remove command should work with any job or portfolio post.

Steps to reproduce

  1. Go to any text channel
  2. Type /remove and enter the ID of a job or portfolio posted with Manny 1.x
  3. The command will fail and Manny will log an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions