Fix mypy relation resolution in CI
Disable reverse manager generation on ArticlePage.category and switch category selection to id-based queries so CI mypy can resolve models reliably. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -68,7 +68,7 @@ class Migration(migrations.Migration):
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name="articles",
|
||||
related_name="+",
|
||||
to="blog.category",
|
||||
),
|
||||
),
|
||||
@@ -79,7 +79,7 @@ class Migration(migrations.Migration):
|
||||
name="category",
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name="articles",
|
||||
related_name="+",
|
||||
to="blog.category",
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user