#16281: ContentType.get_object_for_this_type using wrong database for creating
object
-------------------------------------+-------------------------------------
Reporter: tfrydrychewicz@… | Owner: bcail
Type: Bug | Status: closed
Component: | Version: dev
contrib.contenttypes |
Severity: Normal | Resolution: fixed
Keywords: contenttype, object | Triage Stage: Ready for
get_object_for_this_type, | checkin
database, multiple |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):
In [changeset:"c1686c132046c06403f55d7c743b42fee5d47db3" c1686c13]:
{{{#!CommitTicketReference repository=""
revision="c1686c132046c06403f55d7c743b42fee5d47db3"
[6.0.x] Refs #16281 -- Fixed isolation of admin_views.ViewOnSiteTests.
We were seeing this occasional failure in
FlatpagesSitemapTests.setUpClass(),
which was unexpectedly attempting a write on the "other" database because
of an instance hint from a cached Site:
django.test.testcases.DatabaseOperationForbidden:
Database queries to 'other' are not allowed in this test. Add 'other' to
flatpages_tests.test_sitemaps.FlatpagesSitemapTests.databases to
ensure proper test isolation and silence this failure.
Backport of 59a89d1008ab9220275fbdcff2a44d9bbd920032 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16281#comment:40>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019ea83255c8-1453f31e-f8e4-4e8e-98c6-4cd25652dbcc-000000%40eu-central-1.amazonses.com.