Opened 18 years ago

Closed 18 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 Holovaty
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: no UI/UX: no

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@… 18 years ago.

Download all attachments as: .zip

Change History (3)

by Joel Heenan <joelh-django@…, 18 years ago

Attachment: one_to_one_db_column.diff added

comment:1 by Malcolm Tredinnick, 18 years ago

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

comment:2 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

(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