dont add redundant alts on rdrama

master
Aevann 2024-11-09 16:25:30 +02:00
parent f71574e8da
commit f2c558a382
1 changed files with 1 additions and 2 deletions

View File

@ -67,8 +67,7 @@ def add_alt(user1, user2):
return return
g.db.flush() g.db.flush()
existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).one_or_none() if user1 not in get_alt_graph_ids(user2):
if not existing:
users_exist = (g.db.query(User).filter(User.id.in_(li)).count() == 2) users_exist = (g.db.query(User).filter(User.id.in_(li)).count() == 2)
if not users_exist: if not users_exist:
session.pop("history", None) session.pop("history", None)