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 @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))

View file

@ -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()