Opened 11 years ago

Closed 10 years ago

#1115 closed defect (fixed)

can't update model in db if PK is not called 'id'

Reported by: max Owned by: adrian
Component: Core (Other) Version: 0.90
Severity: major Keywords:
Cc: ischenko@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I have model class where PK defined as this:

id = meta.IntegerField(primary_key=True, db_column='adminID')

When trying to save changes via admin interface I got an error:

OperationalError at /admin/protozeuss/adminusers/1/
(1054, "Unknown column 'id' in 'where clause'")

The SQL is clearly wrong:

'UPDATE `xxx` SET `userID`=%s,`eMail`=%s,`Line`=%s WHERE `id`=%s'

Change History (3)

comment:1 Changed 11 years ago by max

Forgot to add, this is for public release 0.90.

comment:2 Changed 10 years ago by SmileyChris

  • Version set to 0.9

Is this still a relevant issue?

comment:3 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Seems like this has been fixed by now.

Note: See TracTickets for help on using tickets.
Back to Top