Skip to content

Commit

Permalink
Moved scripts around a bit, fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TaaviE committed Oct 21, 2019
1 parent 33c4af7 commit f6f2c69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ venv*/
ENV/
env/

# Node
node_modules/
package-lock.json

# Spyder project settings
.spyderproject
.spyproject
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions views/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def note_remove(request_id: str):
if "confirm" not in request.form.keys():
return render_template("creatething.html",
action="DELETE",
endpoint="removenote",
endpoint=url_for("edit_page.note_remove", request_id=request_id),
extra_data=request_id,
confirm=True)

Expand All @@ -152,7 +152,8 @@ def note_remove(request_id: str):
except Exception as e:
sentry_sdk.capture_exception(e)
return render_template("utility/error.html",
message=_("Can't find what you wanted to delete"),
message=_(
"Can't find what you wanted to delete or some other error occured while deleting"),
title=_("Error"))

logger.info("Removed {} note with ID {}".format(username, request_id))
Expand Down Expand Up @@ -339,7 +340,7 @@ def group_edit(group_id: str):
:param group_id: The Group ID that is being edited
"""
user_id = int(session["user_id"])
endpoint = "editgroup"
endpoint = url_for("edit_page.group_edit")
if "action" not in request.form.keys():
return render_template("utility/error.html",
message=_("An error has occured"),
Expand Down Expand Up @@ -480,7 +481,7 @@ def editfam_with_action():
Deals with all the possible modifications to a family
"""
user_id = int(session["user_id"])
endpoint = "editfam"
endpoint = url_for("edit_page.editfam_with_action")
if "action" not in request.form.keys():
return render_template("utility/error.html",
message=_("An error has occured"),
Expand Down

0 comments on commit f6f2c69

Please sign in to comment.