Skip to content

Commit 494a6d4

Browse files
committed
forgot to ensure the code exits if there are no users to update
1 parent b6c1d6e commit 494a6d4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

wall_e/extensions/leveling.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,11 @@ async def process_outdated_profile_pics(self):
672672
if self.guild is None:
673673
return
674674
user_ids_to_update = await UserPoint.get_users_with_expired_images()
675+
number_of_users_to_update = len(user_ids_to_update)
676+
if number_of_users_to_update == 0:
677+
return
675678
self.logger.debug(
676-
f"[Leveling process_outdated_profile_pics()] {len(user_ids_to_update)} users with outdated CND links"
679+
f"[Leveling process_outdated_profile_pics()] {number_of_users_to_update} users with outdated CND links"
677680
f" to update"
678681
)
679682
await self._update_users(user_ids_to_update)

0 commit comments

Comments
 (0)