Skip to content

Commit

Permalink
Fixing deprecated call to flask.escape
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Oct 30, 2023
1 parent 4fe37f8 commit cd2b3f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/tuber/api/emails.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from tuber import app, aws
from flask import request, Response, stream_with_context, escape
from flask import request, Response, stream_with_context
from tuber.models import *
from tuber.database import db
from tuber.permissions import *
Expand Down Expand Up @@ -126,7 +126,7 @@ def api_email_trigger(event, email):
return "Permission Denied", 403
email = db.query(Email).filter(Email.id == email).one_or_none()
if not email:
return "Could not find requested email {}".format(escape(request.json['email'])), 404
return "Could not find requested email {}".format(request.json['email']), 404
if not email.active:
return "Email must be activated before triggering.", 400
source = db.query(EmailSource).filter(EmailSource.id == email.source).one_or_none()
Expand Down
2 changes: 1 addition & 1 deletion backend/tuber/api/hotels.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import defaultdict
from tuber import app, config
from flask import send_file, request, jsonify, escape, Response, stream_with_context
from flask import send_file, request, jsonify, Response, stream_with_context
from tuber.models import *
from tuber.permissions import *
from tuber.database import db
Expand Down
4 changes: 2 additions & 2 deletions backend/tuber/api/importer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from tuber import app
from flask import request, Response, escape
from flask import request, Response
from tuber.models import *
from tuber.database import db
from tuber.permissions import *
Expand Down Expand Up @@ -204,7 +204,7 @@ def import_mock():
return "Event is a required parament.", 406
event = db.query(Event).filter(Event.id == request.json['event']).one_or_none()
if not event:
return "Could not locate event {}".format(escape(request.json['event'])), 404
return "Could not locate event {}".format(request.json['event']), 404
badges = db.query(Badge).filter(Badge.event == event.id).all()
if badges:
return "You cannot generate mock data if there are already badges. Please delete the badges first if you really want junk data.", 412
Expand Down

0 comments on commit cd2b3f3

Please sign in to comment.