Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Auto increment field ID not ignored if sent in API payload #5871

Closed
1 task done
dstala opened this issue Jun 12, 2023 · 1 comment 路 Fixed by #6878
Closed
1 task done

馃悰 Bug: Auto increment field ID not ignored if sent in API payload #5871

dstala opened this issue Jun 12, 2023 · 1 comment 路 Fixed by #6878
Assignees
Labels
馃煟 Priority: Low Issue related to non core functionality affects less than 10% of users using NocoDB

Comments

@dstala
Copy link
Member

dstala commented Jun 12, 2023

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

Issue observed in PG

  • Insert a record from API with Auto increment field Id set to 1
  • Try to insert a new record from UI after this
error: insert into "Sheet1" ("SingleLineText") values ('aaa') returning "Id" as "Id" - duplicate key value violates unique constraint "Sheet1_pkey"
    at Parser.parseErrorMessage (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:369:69)
    at Parser.handlePacket (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:188:21)
    at Parser.parse (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:103:30)
    at Socket.<anonymous> (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:520:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 185,
  severity: 'ERROR',
  code: '23505',
  detail: 'Key ("Id")=(1) already exists.',
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: 'public',
  table: 'Sheet1',
  column: undefined,
  dataType: undefined,
  constraint: 'Sheet1_pkey',
  file: 'nbtinsert.c',
  line: '663',
  routine: '_bt_check_unique'
}
[Nest] 18736  - 06/12/2023, 4:32:33 PM   ERROR [GlobalExceptionFilter] insert into "Sheet1" ("SingleLineText") values ('aaa') returning "Id" as "Id" - duplicate key value violates unique constraint "Sheet1_pkey"
error: insert into "Sheet1" ("SingleLineText") values ('aaa') returning "Id" as "Id" - duplicate key value violates unique constraint "Sheet1_pkey"
    at Parser.parseErrorMessage (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:369:69)
    at Parser.handlePacket (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:188:21)
    at Parser.parse (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/parser.ts:103:30)
    at Socket.<anonymous> (/Users/rajuudava/NocoDB/nocodb/packages/nocodb/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:520:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

Desired Behavior

Ignore if auto-increment field in API request

Project Details

v0.108.1

Attachments

No response

@dstala dstala added the 馃煟 Priority: Low Issue related to non core functionality affects less than 10% of users using NocoDB label Jun 12, 2023
@dstala dstala added this to the vNext milestone Oct 27, 2023
@dstala dstala modified the milestones: v0.202.6, vNext, v0.203.0 Nov 13, 2023
@dstala dstala removed this from the vFeature milestone Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃煟 Priority: Low Issue related to non core functionality affects less than 10% of users using NocoDB
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@pranavxc @dstala and others