#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:"4abc595b1a25fe723f6d5ec30e505a474f6605c9" 4abc595]:
 {{{#!CommitTicketReference repository=""
 revision="4abc595b1a25fe723f6d5ec30e505a474f6605c9"
 [5.2.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:41>
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/0107019ea8331588-3d723a1a-89ca-472c-864d-f0adc90cd17b-000000%40eu-central-1.amazonses.com.

Reply via email to