Skip to content

Commit 3868e0b

Browse files
committed
Merge branch 'main' of https://github.com/dataease/SQLBot
2 parents add7e33 + 748a418 commit 3868e0b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

backend/apps/chat/curd/chat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def get_chat_with_records(session: SessionDep, chart_id: int, current_user: Curr
8585
else:
8686
chat_info.datasource_exists = True
8787
chat_info.datasource_name = ds.name
88+
chat_info.ds_type = ds.type
8889

8990
record_list = session.query(ChatRecord).options(
9091
load_only(ChatRecord.id, ChatRecord.chat_id, ChatRecord.create_time, ChatRecord.finish_time,

backend/apps/chat/models/chat_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class ChatInfo(BaseModel):
8989
chat_type: str = "chat"
9090
datasource: Optional[int] = None
9191
engine_type: str = ''
92+
ds_type: str = ''
9293
datasource_name: str = ''
9394
datasource_exists: bool = True
9495
records: List[ChatRecord | dict] = []

backend/apps/datasource/crud/datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,4 @@ def filter_list(list_a, list_b):
407407

408408

409409
def is_normal_user(current_user: CurrentUser):
410-
return current_user.id != 1 and (current_user.weight is not None and current_user.weight != 1)
410+
return current_user.id != 1

0 commit comments

Comments
 (0)