Opened 6 years ago

Closed 6 years ago

#14856 closed (duplicate)

Cleanup of ForeignKey.db_type

Reported by: Waldemar Kornewald Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The attached patch cleans up the db_type() function for ForeignKey. It adds a Field.related_db_type() method which returns the db_type for the ForeignKey pointing at that field. Previously, ForeignKey.db_type() had hard-coded isinstance() checks.

Attachments (1)

related_db_type.diff (5.6 KB) - added by Waldemar Kornewald 6 years ago.
patch against trunk

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by Waldemar Kornewald

Attachment: related_db_type.diff added

patch against trunk

comment:1 Changed 6 years ago by Russell Keith-Magee

milestone: 1.3
Resolution: duplicate
Status: newclosed
Summary: [patch] cleanup of ForeignKey.db_typeCleanup of ForeignKey.db_type

Duplicate of #13774

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