Skip to content

Commit

Permalink
fix text query, session not engine
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Sep 21, 2023
1 parent ec63778 commit cdef6f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apolpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from flask import request

from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import text

global CACHED_RESULT
global CACHED_TIME
Expand Down Expand Up @@ -103,7 +104,7 @@


def _fetch():
roles = db.engine.execute(QUERY)
roles = db.session.execute(text(QUERY))
out = []
for role in roles:
out.append(dict(zip(columns, role)))
Expand Down

0 comments on commit cdef6f1

Please sign in to comment.