Skip to content

Commit

Permalink
Use the correct db object for last active
Browse files Browse the repository at this point in the history
  • Loading branch information
henworth committed Sep 9, 2021
1 parent 1375e52 commit 4c127cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions seraphsix/tasks/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ async def get_last_active(ctx, member_db=None, platform_id=None, member_id=None)


async def save_last_active(ctx, member_id):
member_db = await Member.get(id=member_id)
last_active = await get_last_active(ctx, member_db)
member_db.last_active = last_active
await member_db.save()
clanmember_db = await ClanMember.get(member__id=member_id).prefetch_related("member")
last_active = await get_last_active(ctx, clanmember_db.member)
clanmember_db.last_active = last_active
await clanmember_db.save()


async def store_last_active(ctx, guild_id, guild_name):
Expand Down

0 comments on commit 4c127cd

Please sign in to comment.