diff --git a/datamodel_code_generator/model/pydantic/base_model.py b/datamodel_code_generator/model/pydantic/base_model.py index df5b93c35..ef16c1ba6 100644 --- a/datamodel_code_generator/model/pydantic/base_model.py +++ b/datamodel_code_generator/model/pydantic/base_model.py @@ -128,6 +128,5 @@ def __init__( self.extra_template_data['config'] = Config.parse_obj(config_parameters) for field in fields: - field_value = field.field - if field_value and field_value != '...': + if field.field: self.imports.append(IMPORT_FIELD)