Skip to content

Commit

Permalink
Swap if branch conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sultan Iman committed Feb 6, 2024
1 parent 3970bd1 commit ef2308c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlt/common/libs/pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def pydantic_to_table_schema_columns(

if data_type == "complex" and skip_complex_types:
continue
elif is_inner_type_pydantic_model and skip_complex_types:
elif is_inner_type_pydantic_model and not skip_complex_types:
# This case is for a single field schema/model
# we need to generate snake_case field names
# and return flattened field schemas
Expand All @@ -146,7 +146,7 @@ def pydantic_to_table_schema_columns(
**hints,
"name": snake_case_naming_convention.make_path(name, hints["name"]),
}
elif is_inner_type_pydantic_model and not skip_complex_types:
elif is_inner_type_pydantic_model and skip_complex_types:
result[name] = {
"name": name,
"data_type": "complex",
Expand Down

0 comments on commit ef2308c

Please sign in to comment.