Skip to content

Commit 223482d

Browse files
fix: change core_users logic
1 parent cea38a2 commit 223482d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/node/user.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from sqlalchemy.orm import load_only, selectinload
1+
from PasarGuardNodeBridge import create_proxy, create_user
22
from sqlalchemy import select
3-
from PasarGuardNodeBridge import create_user, create_proxy
3+
from sqlalchemy.orm import load_only, selectinload
44

55
from app.db import AsyncSession
6-
from app.db.models import ProxyInbound, Group, User, UserStatus
6+
from app.db.models import Group, ProxyInbound, User, UserStatus
77

88

99
def serialize_user_for_node(id: int, username: str, user_settings: dict, inbounds: list[str] = None):
@@ -34,7 +34,7 @@ async def core_users(db: AsyncSession):
3434
selectinload(User.groups),
3535
selectinload(User.groups).selectinload(Group.inbounds).load_only(ProxyInbound.tag),
3636
)
37-
.filter(User.status.in_([UserStatus.active, UserStatus.on_hold]))
37+
.where(User.status.in_([UserStatus.active, UserStatus.on_hold]))
3838
)
3939
users = (await db.execute(stmt)).unique().scalars().all()
4040
bridge_users: list = []

0 commit comments

Comments
 (0)