Skip to content

Commit b3acc13

Browse files
committed
mypy update fix
1 parent b0306d8 commit b3acc13

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ninja_schema/orm/model_schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def clone_field(cls, field: FieldInfo, **kwargs: Any) -> FieldInfo:
234234

235235
def model_fields(self) -> Iterator[Field]:
236236
"""returns iterator with all the fields that can be part of schema"""
237-
for fld in self.model._meta.get_fields():
237+
for fld in self.model._meta.get_fields(): # type: ignore
238238
if isinstance(fld, (ManyToOneRel, ManyToManyRel)):
239239
# skipping relations
240240
continue
@@ -281,16 +281,16 @@ def is_field_in_optional(self, field_name: str) -> bool:
281281

282282
def process_build_schema_parameters(self) -> None:
283283
model_pk = getattr(
284-
self.model._meta.pk,
284+
self.model._meta.pk, # type: ignore
285285
"name",
286-
getattr(self.model._meta.pk, "attname"),
286+
getattr(self.model._meta.pk, "attname"), # type: ignore
287287
) # no type:ignore
288288
if (
289289
model_pk not in self.include
290290
and model_pk not in self.exclude
291291
and ALL_FIELDS not in self.optional
292292
):
293-
self.optional.add(model_pk)
293+
self.optional.add(str(model_pk))
294294

295295

296296
class ModelSchemaMetaclass(ModelMetaclass):

0 commit comments

Comments
 (0)