Skip to content

Commit ab0806c

Browse files
committed
Fix single file mode
1 parent 6103146 commit ab0806c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

text_2_sql/data_dictionary/data_dictionary_creator.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,10 +686,14 @@ async def create_data_dictionary(self):
686686
if self.single_file:
687687
logging.info("Saving data dictionary to entities.json")
688688
with open("entities.json", "w", encoding="utf-8") as f:
689-
json.dump(
690-
data_dictionary.model_dump(
689+
data_dictionary_dump = [
690+
entity.model_dump(
691691
by_alias=True, exclude=self.excluded_fields_for_database_engine
692-
),
692+
)
693+
for entity in data_dictionary
694+
]
695+
json.dump(
696+
data_dictionary_dump,
693697
f,
694698
indent=4,
695699
default=str,

0 commit comments

Comments
 (0)