1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Un-deprecate Discord.create

This commit is contained in:
Steffo 2019-01-02 20:13:43 +01:00
parent 2bcb842114
commit 830c7fa52a
2 changed files with 1 additions and 2 deletions

2
db.py
View file

@ -522,8 +522,6 @@ class Discord(Base):
@staticmethod
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()
if d is not None:
raise AlreadyExistingError(repr(d))

View file

@ -101,6 +101,7 @@ def new_lol_rank(item, change: typing.Tuple[Dirty]):
def process():
while True:
session = db.Session()
logger.info("Now updating Steam data.")
update_block(session, session.query(db.Steam).all())
session.commit()