Hi, I suddenly came across a weird bug, where when I add a record to a specific table (it doesn't happen with other tables), it inserts the record with the id field == null, but returns a number as if it is the id. Furthermore, the number returned is close to (but not exactly) the number of records in the table (it is a little bigger than the number of rows in the table). The thing is that the highest id field in the table (which was obviously inserted prior to the bug) is 219, while the new ids generated are around 70, and the number of records in the table is 65.
I am using web2py 1.99.7 dev with pysqlite2. Any advice as to how to debug this will be greatly appreciated!