Skip to content

Commit 8b8cd3e

Browse files
perf: System variables are set as user-selectable attributes
1 parent 24d5f2a commit 8b8cd3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backend/apps/system/models/user.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List
1+
from typing import List, Optional
22

33
from sqlalchemy import Column, BigInteger
44
from sqlalchemy.dialects.postgresql import JSONB
@@ -19,7 +19,11 @@ class BaseUserPO(SQLModel):
1919
origin: int = Field(nullable=False, default=0)
2020
create_time: int = Field(default_factory=get_timestamp, sa_type=BigInteger(), nullable=False)
2121
language: str = Field(max_length=255, default="zh-CN")
22-
system_variables: List = Field(sa_column=Column(JSONB, nullable=True))
22+
#system_variables: List = Field(sa_column=Column(JSONB, nullable=True))
23+
system_variables: Optional[List] = Field(
24+
default=None,
25+
sa_column=Column(JSONB, nullable=True)
26+
)
2327

2428

2529
class UserModel(SnowflakeBase, BaseUserPO, table=True):

0 commit comments

Comments
 (0)