fssf
This commit is contained in:
parent
a7afa9eb73
commit
00b779918b
1 changed files with 20 additions and 8 deletions
|
@ -47,17 +47,29 @@ def check_for_alts(current_id):
|
|||
|
||||
otheralts = g.db.query(Alt).options(lazyload('*')).filter(or_(Alt.user1 == past_id, Alt.user2 == past_id, Alt.user1 == current_id, Alt.user2 == current_id)).all()
|
||||
for a in otheralts:
|
||||
new_alt = Alt(user1=a.user1, user2=past_id)
|
||||
g.db.add(new_alt)
|
||||
try:
|
||||
new_alt = Alt(user1=a.user1, user2=past_id)
|
||||
g.db.add(new_alt)
|
||||
g.db.flush()
|
||||
except: g.db.rollback()
|
||||
for a in otheralts:
|
||||
new_alt = Alt(user1=a.user1, user2=current_id)
|
||||
g.db.add(new_alt)
|
||||
try:
|
||||
new_alt = Alt(user1=a.user1, user2=current_id)
|
||||
g.db.add(new_alt)
|
||||
g.db.flush()
|
||||
except: g.db.rollback()
|
||||
for a in otheralts:
|
||||
new_alt = Alt(user1=a.user2, user2=past_id)
|
||||
g.db.add(new_alt)
|
||||
try:
|
||||
new_alt = Alt(user1=a.user2, user2=past_id)
|
||||
g.db.add(new_alt)
|
||||
g.db.flush()
|
||||
except: g.db.rollback()
|
||||
for a in otheralts:
|
||||
new_alt = Alt(user1=a.user2, user2=current_id)
|
||||
g.db.add(new_alt)
|
||||
try:
|
||||
new_alt = Alt(user1=a.user2, user2=current_id)
|
||||
g.db.add(new_alt)
|
||||
g.db.flush()
|
||||
except: g.db.rollback()
|
||||
|
||||
# login post procedure
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue