Skip to content

Commit

Permalink
Merge pull request #88 from ilyarolf/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ilyarolf authored Dec 27, 2024
2 parents 2c56cf9 + f52f5fb commit 48dd62f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion repositories/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def get_by_tgid(user_dto: UserDTO) -> UserDTO | None:

@staticmethod
async def update(user_dto: UserDTO) -> None:
user_dto_dict = user_dto.__dict__
user_dto_dict = user_dto.model_dump()
none_keys = [k for k, v in user_dto_dict.items() if v is None]
for k in none_keys:
user_dto_dict.pop(k)
Expand Down
4 changes: 2 additions & 2 deletions services/cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ async def buy_processing(callback: CallbackQuery) -> tuple[str, InlineKeyboardBu
await CartItemRepository.remove_from_cart(cart_item.id)
sold_items.append(cart_item)
msg += MessageService.create_message_with_bought_items(purchased_items)
user.consume_records = user.consume_records + cart_total
await UserRepository.update(user)
user.consume_records = user.consume_records + cart_total
await UserRepository.update(user)
await NotificationService.new_buy(sold_items, user)
return msg, kb_builder
elif unpacked_cb.confirmation is False:
Expand Down

0 comments on commit 48dd62f

Please sign in to comment.