From e0833e75a1089b6d6c215034c6ad67b877abed51 Mon Sep 17 00:00:00 2001 From: Zuzel Vera Date: Tue, 14 Mar 2023 13:33:39 -0700 Subject: [PATCH 1/3] Update test_related_fields.yml --- tests/typecheck/models/test_related_fields.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/typecheck/models/test_related_fields.yml b/tests/typecheck/models/test_related_fields.yml index b9a801980..d3232d3a0 100644 --- a/tests/typecheck/models/test_related_fields.yml +++ b/tests/typecheck/models/test_related_fields.yml @@ -20,6 +20,7 @@ from django.db import models class OwnedModel(models.Model): owner = models.ForeignKey("users.User", on_delete=models.CASCADE) + myself = models.ForeignKey("self") class Meta: abstract = True From 7316bff65f763fc4cae6aa54844262f7112b46e6 Mon Sep 17 00:00:00 2001 From: Zuzel Vera Date: Tue, 14 Mar 2023 16:28:46 -0700 Subject: [PATCH 2/3] Update test_related_fields.yml --- tests/typecheck/models/test_related_fields.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/typecheck/models/test_related_fields.yml b/tests/typecheck/models/test_related_fields.yml index d3232d3a0..b3d5b0089 100644 --- a/tests/typecheck/models/test_related_fields.yml +++ b/tests/typecheck/models/test_related_fields.yml @@ -20,7 +20,7 @@ from django.db import models class OwnedModel(models.Model): owner = models.ForeignKey("users.User", on_delete=models.CASCADE) - myself = models.ForeignKey("self") + myself = models.ForeignKey("self", on_delete=models.CASCADE) class Meta: abstract = True From a92b7f14e0849579e5ad1fb4d3918c3aebbe839e Mon Sep 17 00:00:00 2001 From: Zuzel Vera Date: Wed, 15 Mar 2023 12:00:45 -0700 Subject: [PATCH 3/3] Update test_related_fields.yml --- tests/typecheck/models/test_related_fields.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/typecheck/models/test_related_fields.yml b/tests/typecheck/models/test_related_fields.yml index b3d5b0089..9be1c86b1 100644 --- a/tests/typecheck/models/test_related_fields.yml +++ b/tests/typecheck/models/test_related_fields.yml @@ -7,6 +7,7 @@ reveal_type(Model2().test) # N: Revealed type is "app3.models.Model3_RelatedManager" reveal_type(Model1().test2) # N: Revealed type is "app3.models.Model4_RelatedManager" reveal_type(Model2().test2) # N: Revealed type is "app3.models.Model4_RelatedManager" + Model1() installed_apps: - base - users