Skip to content

Commit

Permalink
fix:datasource run data error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries-ckt committed Apr 10, 2024
1 parent b900b1c commit 8fdb043
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions dbgpt/app/scene/chat_dashboard/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ def get_chart_values_by_data(self, field_names, datas, chart_sql: str):
)

for field_name in field_names[1:]:
# if not field_map[field_name]:
# logger.info("More than 2 non-numeric column:" + field_name)
# else:
for data in datas:
value_item = ValueItem(
name=data[0],
type=field_name,
value=str(data[field_names.index(field_name)]),
)
values.append(value_item)
if not field_map[field_name]:
logger.info("More than 2 non-numeric column:" + field_name)
else:
for data in datas:
value_item = ValueItem(
name=data[0],
type=field_name,
value=str(data[field_names.index(field_name)]),
)
values.append(value_item)
return field_names, values
except Exception as e:
logger.debug("Prepare Chart Data Failed!" + str(e))
Expand Down

0 comments on commit 8fdb043

Please sign in to comment.