Skip to content

Commit

Permalink
chore:update purchase_service.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jingooo5 committed Nov 2, 2024
1 parent 5637834 commit 4d539da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/purchase_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def purchase_history_list_save(data_list: List[PurchaseHistory]):
def purchase_history_db(data : UserItemAdd):
with get_db() as db:
item_id = db.query(UserItem).filter(UserItem.user_id == data.user_id, UserItem.item_name == data.item_name).first().item_id
return PurchaseHistory(user_id=data.user_id, item_id=item_id, price=data.price, count=1, date=data.purchase_date)
return PurchaseHistory(user_id=data.user_id, item_id=item_id, price=data.price, count=data.count, date=data.purchase_date)

def purchase_history_save(data : PurchaseHistory):
with get_db() as db:
Expand Down

0 comments on commit 4d539da

Please sign in to comment.