ual-cci / checkout

Checkout is a software system for tracking assets within a higher education environment, originally created for use at University of the Arts London.
MIT License
4 stars 2 forks source link

Crash when resetting the same option more than once #47

Open unknowndomain opened 8 months ago

unknowndomain commented 8 months ago

Steps to reproduce:

  1. Edit setting
  2. Reset
  3. Edit
  4. Reset - CRASH
/Users/tlynch/git/checkout/node_modules/pg-protocol/dist/parser.js:287
        const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
                                                                                                 ^

error: delete from "options" where "id" = $1 - invalid input syntax for type integer: "{"id":19}"
    at Parser.parseErrorMessage (/Users/tlynch/git/checkout/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/Users/tlynch/git/checkout/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/Users/tlynch/git/checkout/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/Users/tlynch/git/checkout/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 147,
  severity: 'ERROR',
  code: '22P02',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: "unnamed portal parameter $1 = '...'",
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'numutils.c',
  line: '323',
  routine: 'pg_strtoint32'
}