Skip to content

Commit

Permalink
fix: clean URL field from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
EDM115 committed Sep 9, 2024
1 parent 76d4f7c commit 3782a1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unzipper/helpers/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ async def update_thumb(user_id):
{"_id": user_id}, {"$set": {"file_id": existing.get("temp")}}
)
await thumb_db.update_one({"_id": user_id}, {"$unset": {"temp": ""}})
if existing.get("url") is not None:
await thumb_db.update_one({"_id": user_id}, {"$unset": {"url": ""}})
else:
return

Expand Down

0 comments on commit 3782a1e

Please sign in to comment.