#27595: Database converters are not run for related fields referencing related
fields
-------------------------------------+-------------------------------------
     Reporter:  oyooyo               |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.10
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 A minimal reproduction test as of 084573c7156530047bec2c19e732423fa9d0ec13
 is

 {{{
 diff --git a/tests/model_fields/test_uuid.py
 b/tests/model_fields/test_uuid.py
 index bc1c8d5bc0..6b6af3ea7e 100644
 --- a/tests/model_fields/test_uuid.py
 +++ b/tests/model_fields/test_uuid.py
 @@ -170,8 +170,12 @@ class TestAsPrimaryKey(TestCase):
          self.assertEqual(r.uuid_fk, u2)

      def test_two_level_foreign_keys(self):
 +        gc = UUIDGrandchild()
          # exercises ForeignKey.get_db_prep_value()
 -        UUIDGrandchild().save()
 +        gc.save()
 +        gc.refresh_from_db()
 +        self.assertIsInstance(gc.uuidchild_ptr_id, uuid.UUID)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27595#comment:9>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.fc5df3f85bdf4f6ba83d412ffb6ddf47%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to