Opened 6 years ago

Closed 6 years ago

#14856 closed (duplicate)

Cleanup of ForeignKey.db_type

Reported by: wkornewald 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:


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 wkornewald 6 years ago.
patch against trunk

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by wkornewald

patch against trunk

comment:1 Changed 6 years ago by russellm

  • milestone 1.3 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from [patch] cleanup of ForeignKey.db_type to Cleanup of ForeignKey.db_type

Duplicate of #13774

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