Opened 5 years ago

Last modified 4 years ago

#13793 new Bug

reverse of OneToOne relation should use default manager if use_for_related_fields specified

Reported by: shauncutts Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Normal Keywords:
Cc: shaun@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When retrieving the related object in a reverse OneToOne relation, the SingleRelatedObjectDescriptor doesn't respect "use_for_related_fields" if defined by the default manager for the class of the related object. See patch for proposed fix (which indicates the code in question as well).

Attachments (1)

one_to_one_use_default_manager_if_asked.diff (1.0 KB) - added by shauncutts 5 years ago.
patch for SingleRelatedObjectDescriptor

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by shauncutts

patch for SingleRelatedObjectDescriptor

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 4 years ago by graham_king

  • Severity set to Normal
  • Type set to Bug

comment:3 Changed 4 years ago by julien

  • Needs tests set

comment:4 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

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