same as last commit

pull/195/head
Aevann 2023-08-23 00:39:32 +03:00
parent bccc2fb35f
commit 3f7a15c431
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ def add_alt(user1, user2):
if AEVANN_ID in (user1, user2) or CARP_ID in (user1, user2):
return
li = [user1, user2]
g.db.flush()
existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).one_or_none()
if not existing:
new_alt = Alt(user1=user1, user2=user2)