From 32eb09dacead97d305756da251177f679ec0bc04 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 28 Apr 2017 19:48:46 +0200 Subject: [PATCH] else --- database.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/database.py b/database.py index 3803d54a..a2b52ab0 100644 --- a/database.py +++ b/database.py @@ -134,25 +134,26 @@ async def update_lol(discord_id): account.flexq_division = None account.ttq_tier = None account.ttq_division = None - # Update the user data - if soloq is not None: - account.soloq_tier = lol.tiers.index(soloq["tier"]) - account.soloq_division = lol.divisions.index(soloq["entries"][0]["division"]) else: - account.soloq_tier = None - account.soloq_division = None - if flexq is not None: - account.flexq_tier = lol.tiers.index(flexq["tier"]) - account.flexq_division = lol.divisions.index(flexq["entries"][0]["division"]) - else: - account.flexq_tier = None - account.flexq_division = None - if ttq is not None: - account.ttq_tier = lol.tiers.index(ttq["tier"]) - account.ttq_division = lol.divisions.index(ttq["entries"][0]["division"]) - else: - account.ttq_tier = None - account.ttq_division = None + # Update the user data + if soloq is not None: + account.soloq_tier = lol.tiers.index(soloq["tier"]) + account.soloq_division = lol.divisions.index(soloq["entries"][0]["division"]) + else: + account.soloq_tier = None + account.soloq_division = None + if flexq is not None: + account.flexq_tier = lol.tiers.index(flexq["tier"]) + account.flexq_division = lol.divisions.index(flexq["entries"][0]["division"]) + else: + account.flexq_tier = None + account.flexq_division = None + if ttq is not None: + account.ttq_tier = lol.tiers.index(ttq["tier"]) + account.ttq_division = lol.divisions.index(ttq["entries"][0]["division"]) + else: + account.ttq_tier = None + account.ttq_division = None # Mark the user as updated account.last_updated = datetime.datetime.now() # Commit the changes