Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13428 closed (fixed)

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

Reported by: jcd Owned by: jcd
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:

Description

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 jcd 5 years ago.
Patch to fix code example in multi-db documentation.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by jcd

Patch to fix code example in multi-db documentation.

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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