Skip to content

Commit

Permalink
Convert users to list
Browse files Browse the repository at this point in the history
  • Loading branch information
mhbahmani committed Nov 1, 2023
1 parent c7ba065 commit b0fe1ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/automatic_reserve_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ async def automatic_reserve(self, context=None, user_id: str = None, admin_user_
else:
bot = context.bot
logging.info("########### Automatic reserve started ################")
users = [self.db.get_user_reserve_info(user_id)] if user_id else self.db.get_users_with_automatic_reserve()
users = [self.db.get_user_reserve_info(user_id)] if user_id else list(self.db.get_users_with_automatic_reserve())
logging.info(f"**** Number of users: {len(users)} ****")
for user in list(users):
for user in users:
msg_receiver_id = admin_user_id if admin_user_id else user['user_id']
reserves = {}
try:
Expand Down

0 comments on commit b0fe1ea

Please sign in to comment.