File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ def orm_to_model_field_values(
311311 """
312312 fields : dict [str , Any ] = {}
313313
314- Model = self .Model if self .pk else self .CreateModel # noqa: N806
314+ Model = self .Model if self .is_stored else self .CreateModel # noqa: N806
315315
316316 for key , field in Model .model_fields .items ():
317317 if (skip_read_only and get_metadata (field , 'exclude_to_orm' )) or key == 'extras' :
@@ -346,7 +346,7 @@ def to_model(
346346 repository_path = repository_path ,
347347 serialize_repository_content = serialize_repository_content ,
348348 )
349- Model = self .Model if self .pk else self .CreateModel # noqa: N806
349+ Model = self .Model if self .is_stored else self .CreateModel # noqa: N806
350350 return Model (** fields )
351351
352352 @classmethod
You can’t perform that action at this time.
0 commit comments