Skip to content

Commit

Permalink
[python] Fix postponed model imports (#16882)
Browse files Browse the repository at this point in the history
* replaced method used on model to import the model not the mapping name

* replaced method used on model to import the model not the mapping name
  • Loading branch information
OliverTetzTT authored Nov 1, 2023
1 parent 4302d37 commit 4402635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ private ModelsMap postProcessModelsMap(ModelsMap objs) {
typingImports.add("Union");
Set<CodegenDiscriminator.MappedModel> discriminator = model.getDiscriminator().getMappedModels();
for (CodegenDiscriminator.MappedModel mappedModel : discriminator) {
postponedModelImports.add(mappedModel.getMappingName());
postponedModelImports.add(mappedModel.getModelName());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ private ModelsMap postProcessModelsMap(ModelsMap objs) {
typingImports.add("Union");
Set<CodegenDiscriminator.MappedModel> discriminator = model.getDiscriminator().getMappedModels();
for (CodegenDiscriminator.MappedModel mappedModel : discriminator) {
postponedModelImports.add(mappedModel.getMappingName());
postponedModelImports.add(mappedModel.getModelName());
}
}
}
Expand Down

0 comments on commit 4402635

Please sign in to comment.