Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TaaviE committed Dec 17, 2020
1 parent d9048b4 commit 2b7d1b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions views/edit/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ def note_remove(request_id: str):

try: # Let's try to delete it now
Wishlist.query.filter_by(id=request_id).delete()

db.session.commit()
except Exception as e:
sentry_sdk.capture_exception(e)
logger.error(e)
return render_template("utility/error.html",
message=_(
"Can't find what you wanted to delete or some other error occured while deleting"),
Expand Down

0 comments on commit 2b7d1b3

Please sign in to comment.