fdfd
This commit is contained in:
parent
0e770e003e
commit
3cd90b1cee
10 changed files with 12 additions and 26 deletions
|
@ -1,4 +1,4 @@
|
|||
from sqlalchemy.orm import deferred, aliased
|
||||
from sqlalchemy.orm import deferred
|
||||
from secrets import token_hex
|
||||
import pyotp
|
||||
from files.helpers.discord import remove_user
|
||||
|
@ -371,12 +371,12 @@ class User(Base):
|
|||
|
||||
data = g.db.query(
|
||||
User,
|
||||
aliased(Alt, alias=subq)
|
||||
Alt
|
||||
).join(
|
||||
subq,
|
||||
or_(
|
||||
subq.c.user1 == User.id,
|
||||
subq.c.user2 == User.id
|
||||
Alt.c.user1 == User.id,
|
||||
Alt.c.user2 == User.id
|
||||
)
|
||||
).filter(
|
||||
User.id != self.id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue