Skip to content

Commit

Permalink
fix indexing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Nov 16, 2024
1 parent e5cf965 commit 86092d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wren-ai-service/src/pipelines/indexing/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def _convert_models_and_relationships(
if "relationship" not in column:
if "properties" in column:
column_properties = {
"alias": column["properties"].pop("displayName", ""),
"description": column["properties"].pop("description", ""),
"alias": column["properties"].get("displayName", ""),
"description": column["properties"].get("description", ""),
}
nested_cols = {
k: v
Expand Down Expand Up @@ -314,8 +314,8 @@ def _convert_models_and_relationships(

if "properties" in model:
model_properties = {
"alias": model["properties"].pop("displayName", ""),
"description": model["properties"].pop("description", ""),
"alias": model["properties"].get("displayName", ""),
"description": model["properties"].get("description", ""),
}
comment = f"\n/* {orjson.dumps(model_properties).decode("utf-8")} */\n"
else:
Expand Down

0 comments on commit 86092d6

Please sign in to comment.