We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5412c62 commit a66be68Copy full SHA for a66be68
litestar_django/dto.py
@@ -213,6 +213,10 @@ def get_model_fields(
213
# we need a concrete field to infer the type though, so we construct
214
# it from the type of the related primary key field
215
related_field = fk_tuple[1]
216
+ # follow inherited fk relationships
217
+ while isinstance(related_field, ForeignKey):
218
+ related_field = related_field.related_fields[0][1]
219
+
220
id_field = type(related_field)(
221
name=name,
222
null=field.null,
pyproject.toml
@@ -1,6 +1,6 @@
1
[project]
2
name = "litestar-django"
3
-version = "0.2.1"
+version = "0.2.2"
4
description = "Django model support for Litestar"
5
readme = "README.md"
6
license = { text = "MIT" }
0 commit comments