Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#13428 closed (fixed)

Multi-db router documentation example doesn't work as written.

Reported by: Cliff Dyer Owned by: Cliff Dyer
Component: Documentation Version: master
Severity: Keywords: multidb model documentation
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The MasterSlaveRouter.allow_relation example method documented in /docs/topics/db/multi-db.txt doesn't work as written. It checks if a model instance is in a list of strings representing the names of the various databases. It should check obj._state.db on each of those objects rather than checking obj directly.

Attachments (1)

allow_relation_example.diff (578 bytes) - added by Cliff Dyer 7 years ago.
Patch to fix code example in multi-db documentation.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Cliff Dyer

Attachment: allow_relation_example.diff added

Patch to fix code example in multi-db documentation.

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

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

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

Resolution: fixed
Status: newclosed

(In [13133]) Fixed #13428 -- Corrected the allow_relation behavior of and example router. Thanks to jcd for the report and patch.

comment:3 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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