Skip to content

Commit

Permalink
databse: set upsert=False in plus_fl_count
Browse files Browse the repository at this point in the history
  • Loading branch information
Itz-fork committed Jan 2, 2024
1 parent 2745359 commit 567b887
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions megadl/helpers/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ async def plus_fl_count(
{"_id": user_id},
{"$inc": {"total_downloads": downloads}},
use_given=True,
upsert=False,
)
elif uploads:
await self.mongoc.update_async(
self.coll_users,
{"_id": user_id},
{"$inc": {"total_uploads": uploads}},
use_given=True,
upsert=False,
)

async def delete(self, user_id: int):
Expand Down

0 comments on commit 567b887

Please sign in to comment.