mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
Merge branch 'main' of https://github.com/dataease/SQLBot
This commit is contained in:
@@ -85,6 +85,7 @@ def get_chat_with_records(session: SessionDep, chart_id: int, current_user: Curr
|
||||
else:
|
||||
chat_info.datasource_exists = True
|
||||
chat_info.datasource_name = ds.name
|
||||
chat_info.ds_type = ds.type
|
||||
|
||||
record_list = session.query(ChatRecord).options(
|
||||
load_only(ChatRecord.id, ChatRecord.chat_id, ChatRecord.create_time, ChatRecord.finish_time,
|
||||
|
||||
@@ -89,6 +89,7 @@ class ChatInfo(BaseModel):
|
||||
chat_type: str = "chat"
|
||||
datasource: Optional[int] = None
|
||||
engine_type: str = ''
|
||||
ds_type: str = ''
|
||||
datasource_name: str = ''
|
||||
datasource_exists: bool = True
|
||||
records: List[ChatRecord | dict] = []
|
||||
|
||||
@@ -407,4 +407,4 @@ def filter_list(list_a, list_b):
|
||||
|
||||
|
||||
def is_normal_user(current_user: CurrentUser):
|
||||
return current_user.id != 1 and (current_user.weight is not None and current_user.weight != 1)
|
||||
return current_user.id != 1
|
||||
|
||||
Reference in New Issue
Block a user