Opened 14 years ago

Closed 9 years ago

Last modified 9 years ago

#13637 closed Bug (fixed)

Generic Relations don't work correctly on a non-default database alias

Reported by: Andrew Godwin Owned by:
Component: contrib.contenttypes Version: dev
Severity: Normal Keywords: multi-db, truncation
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Specifically, line 195 of contrib.contenttypes.generic uses django.db.connection directly - this needs to be fixed.

It looks like it will need connection-choosing pushed inside the RelatedManager provided. I'm going to work on fixing this - just noting it as a separate ticket to #13528 (I found it while fixing that, but it's a separate issue, pretty much, it affects quoting as well as table name truncation).

Attachments (1)

django-ct-dbs.diff (4.8 KB ) - added by Alex Gaynor 14 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Andrew Godwin, 14 years ago

Owner: changed from nobody to Andrew Godwin
Status: newassigned
Triage Stage: UnreviewedAccepted
Version: 1.1SVN

by Alex Gaynor, 14 years ago

Attachment: django-ct-dbs.diff added

comment:2 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:3 by anonymous, 14 years ago

Component: Database layer (models, ORM)contrib.contenttypes

comment:4 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by Andrew Godwin, 11 years ago

Owner: Andrew Godwin removed
Status: assignednew

comment:7 by Tim Graham, 9 years ago

Has patch: set

It looks like the code in question is unused: PR to remove it.

comment:8 by Tim Graham <timograham@…>, 9 years ago

In 37a5a36:

Refs #13637 -- Removed unused code in GenericRelatedObjectManager

Appears unused since 585b7acaa359fc1df07269c1a4b4756bdb6703f7.

comment:9 by Tim Graham, 9 years ago

Resolution: fixed
Status: newclosed

comment:10 by Tim Graham <timograham@…>, 9 years ago

In aebe780:

[1.9.x] Refs #13637 -- Removed unused code in GenericRelatedObjectManager

Appears unused since 585b7acaa359fc1df07269c1a4b4756bdb6703f7.

Backport of 37a5a363215d7c0360ff0a8f57856d373e8c1629 from master

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