mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
tiny fix on newuser.py
This commit is contained in:
parent
d673b55f30
commit
fbe1c78399
1 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
|||
import db
|
||||
|
||||
session = db.Session()
|
||||
user = db.Royal.create(session, input("Nome account: "))
|
||||
username = input("Nome account: ")
|
||||
user = session.query(db.Royal).filter_by(username=username).one_or_none()
|
||||
if user is None:
|
||||
user = db.Royal.create(session, username)
|
||||
session.add(user)
|
||||
session.commit()
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue