Ticket #1504 (new defect)

Opened 2 years ago

get_last_id() causing an error and sequence question

Reported by: brian@derocher.org Assigned to: codeFiend
Priority: normal Component: MantisImportScript
Severity: critical Keywords: currval, seqence
Cc: Trac Release: 0.10

Description

This line was giving me an error.

return self.db().get_last_id(c,'ticket')

psycopg2.ProgrammingError?: currval of sequence "ticket_id_seq" is not yet defined in this session

This seems utterly wrong to me since i can select currval('ticket_id_seq') via psql. It's not used so i commented it out.

On a slightly different note, are the sequences in postgresql set correctly after all tickets, comments, stuff are inserted?

Attachments


Add/Change #1504 (get_last_id() causing an error and sequence question)




Change Properties
Action