master
Aevann1 2021-11-07 22:34:12 +02:00
parent 20e6a937ef
commit 616b039735
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
from sqlalchemy.orm import deferred
from sqlalchemy.orm import deferred, aliased
from secrets import token_hex
import pyotp
from files.helpers.discord import remove_user
@ -372,12 +372,12 @@ class User(Base):
data = g.db.query(
User,
Alt
aliased(Alt, alias=subq)
).join(
subq,
or_(
Alt.c.user1 == User.id,
Alt.c.user2 == User.id
subq.c.user1 == User.id,
subq.c.user2 == User.id
)
).filter(
User.id != self.id