Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 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 4 years ago.
Patch to fix code example in multi-db documentation.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by jcd

Patch to fix code example in multi-db documentation.

comment:1 Changed 4 years ago by russellm

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

comment:2 Changed 4 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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.