mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Un-deprecate Discord.create
This commit is contained in:
parent
2bcb842114
commit
830c7fa52a
2 changed files with 1 additions and 2 deletions
2
db.py
2
db.py
|
@ -522,8 +522,6 @@ class Discord(Base):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create(session: Session, royal_username, discord_user: DiscordUser):
|
def create(session: Session, royal_username, discord_user: DiscordUser):
|
||||||
# TODO: remove this
|
|
||||||
print("Discord.create is deprecated and should be removed soon.")
|
|
||||||
d = session.query(Discord).filter(Discord.discord_id == discord_user.id).first()
|
d = session.query(Discord).filter(Discord.discord_id == discord_user.id).first()
|
||||||
if d is not None:
|
if d is not None:
|
||||||
raise AlreadyExistingError(repr(d))
|
raise AlreadyExistingError(repr(d))
|
||||||
|
|
|
@ -101,6 +101,7 @@ def new_lol_rank(item, change: typing.Tuple[Dirty]):
|
||||||
def process():
|
def process():
|
||||||
while True:
|
while True:
|
||||||
session = db.Session()
|
session = db.Session()
|
||||||
|
|
||||||
logger.info("Now updating Steam data.")
|
logger.info("Now updating Steam data.")
|
||||||
update_block(session, session.query(db.Steam).all())
|
update_block(session, session.query(db.Steam).all())
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
Loading…
Reference in a new issue