Skip to content

Commit

Permalink
правки
Browse files Browse the repository at this point in the history
  • Loading branch information
HamletSargsyan committed May 31, 2024
1 parent a4a683b commit ec66405
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/base/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ def get_or_add_user_item(user: UserModel, name: str) -> Union[ItemModel, NoRetur
item = database.items.get(**{"owner": user._id, "name": name})
except NoResult:
item = ItemModel(owner=user._id, name=name)
database.items.add(**item.to_dict())
id = database.items.add(**item.to_dict()).inserted_id
item.id = id

return item

Expand Down

0 comments on commit ec66405

Please sign in to comment.