Ticket : https://code.djangoproject.com/ticket/34634 PR : https://github.com/django/django/pull/16952
*Possible reason behind the bug:* - The local OneToOneField of place_ptr inside ItalianRestaurantManyParents is being inherited from the place_ptr field of Restaurant. Which is one of the ancestor of the current model. - That successfully inserts the model Place while calling _save_parents() for Restaurant inside the recursion tree. - So the local field of place_ptr does not have an attribute with name attname. *Possible fix :* - When fetching the immediate parents inside the _save_parents() method, eliminate the ones which have a subclass inside that list. As they willbe called again when we insert their subclass. *Problem with the fix:* Not being able to reproduce the behavior of the failed test in Local with postgresql and sqlite3 database. All the assertions are passing there. Traceback (most recent call last): File "/home/jenkins/workspace/pull-requests-focal/database/mysql/label/focal-pr/python/python3.11/tests/model_inheritance/tests.py", line 169, in test_create_diamond_mti_common_parents self.assertEqual(itrmp.name, "Ristorante Miron") AssertionError: '' != 'Ristorante Miron' + Ristorante Miron -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/020f45df-a8ee-4d5e-9ee1-34593513dedcn%40googlegroups.com.