Opened 10 years ago

Closed 10 years ago

#2783 closed defect (fixed)

[patch] Small patch to make One to One fields work with any data type

Reported by: Joel Heenan <joelh-django@…> Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Django appears to assume that a one to one field will be referrencing an integer and breaks if it is not. This small patch means that tables are created with the same data type as to that which they are referrencing.

Attachments (1)

one_to_one_db_column.diff (608 bytes) - added by Joel Heenan <joelh-django@… 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Joel Heenan <joelh-django@…

comment:1 Changed 10 years ago by mtredinnick

This looks correct, but it needs a test before it can be committed.

comment:2 Changed 10 years ago by mtredinnick

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

(In [3846]) Fixed #2783 -- Fixed one-to-one fields to work with any primary key data type
in the related model. Thanks, Joel Heenan.

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