Skip to content

Commit

Permalink
Merge pull request #89 from henworth:fix_last_active_collection
Browse files Browse the repository at this point in the history
Use the correct db object for last active
  • Loading branch information
henworth authored Sep 9, 2021
2 parents 1375e52 + 4c127cd commit cd72a3a
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 cd72a3a

Please sign in to comment.