mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Flush session instead of committing when creating a new user
This commit is contained in:
parent
b501960fed
commit
2a01e025ec
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ user = session.query(db.Royal).filter_by(username=username).one_or_none()
|
||||||
if user is None:
|
if user is None:
|
||||||
user = db.Royal.create(session, username)
|
user = db.Royal.create(session, username)
|
||||||
session.add(user)
|
session.add(user)
|
||||||
session.commit()
|
session.flush()
|
||||||
try:
|
try:
|
||||||
steam = db.Steam.create(session, user.id, input("Steam ID 1: "))
|
steam = db.Steam.create(session, user.id, input("Steam ID 1: "))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue