forked from MarseyWorld/MarseyWorld
dsf
parent
20e6a937ef
commit
616b039735
|
@ -1,4 +1,4 @@
|
||||||
from sqlalchemy.orm import deferred
|
from sqlalchemy.orm import deferred, aliased
|
||||||
from secrets import token_hex
|
from secrets import token_hex
|
||||||
import pyotp
|
import pyotp
|
||||||
from files.helpers.discord import remove_user
|
from files.helpers.discord import remove_user
|
||||||
|
@ -372,12 +372,12 @@ class User(Base):
|
||||||
|
|
||||||
data = g.db.query(
|
data = g.db.query(
|
||||||
User,
|
User,
|
||||||
Alt
|
aliased(Alt, alias=subq)
|
||||||
).join(
|
).join(
|
||||||
subq,
|
subq,
|
||||||
or_(
|
or_(
|
||||||
Alt.c.user1 == User.id,
|
subq.c.user1 == User.id,
|
||||||
Alt.c.user2 == User.id
|
subq.c.user2 == User.id
|
||||||
)
|
)
|
||||||
).filter(
|
).filter(
|
||||||
User.id != self.id
|
User.id != self.id
|
||||||
|
|
Loading…
Reference in New Issue