#20946 closed Cleanup/optimization (fixed)
Clean up related field foreign value fetching implementation
Reported by: | Anssi Kääriäinen | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There are currently two ways to fetch the foreign key value from the instance in fields/related.py. The other is get_foreign_related_value() and the other is ._get_fk_val(). The latter only works for single column foreign values. Also, these methods do slightly different things. So, getting rid of ._get_fk_val() seems like a good idea to me.
Note:
See TracTickets
for help on using tickets.
In b065aeb17f9daf395e22d4d5f9f49c0e2c7f4522: