Rewrite sqlachemy code for 1.4 to 2.x migration

This commit is contained in:
2024-01-11 20:48:13 +01:00
committed by Brain
parent 146eb995a8
commit 2ff958c55f
4 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@ from ki.auth import auth
from ki.handlers import find_profiles as find_profiles_handler
from ki.handlers import update_profile as update_profile_handler
from ki.models import ContactType, Language, Skill, Token, User
from app import app
from app import app, db
content_type_svg = "image/svg+xml"
content_type_png = "image/png"
@ -66,7 +66,7 @@ def handle_completion_request(model, key):
def handle_icon_request(model, id, path):
object = model.query.get(id)
object = db.session.get(model, id)
if object is None:
return make_response({}, 404)