Skip to content

Commit 51ca23e

Browse files
committed
log has to be changed to account for new members without any expiry date yet
1 parent 39688cc commit 51ca23e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

wall_e/extensions/leveling.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,12 +820,15 @@ async def _update_member_profile_data(self, logger, member, updated_user_id, ind
820820
user_updated = False
821821
user_processed = False
822822
try:
823+
expiry_date = (
824+
self.user_points[member.id].discord_avatar_link_expiry_date.pst
825+
if self.user_points[member.id].discord_avatar_link_expiry_date else None
826+
)
823827
logger.debug(
824828
f"[Leveling _update_member_profile_data()] "
825829
f"attempt {self.user_points[member.id].leveling_update_attempt} to update the member profile "
826830
f"data in the database for member {member} with id [{member.id}], "
827-
f"updated_user_log_id = {updated_user_log_id}, expiry_date of "
828-
f"[{self.user_points[member.id].discord_avatar_link_expiry_date.pst}] and a CDN link of "
831+
f"updated_user_log_id = {updated_user_log_id}, expiry_date of [{expiry_date}] and a CDN link of "
829832
f"<{self.user_points[member.id].leveling_message_avatar_url}> "
830833
f"{index + 1}/{total_number_of_updates_needed}"
831834
)

0 commit comments

Comments
 (0)