Skip to content

Commit

Permalink
Job tables use utf8, not utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 4, 2022
1 parent ff06f78 commit 95276bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/saliweb/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def _get_logged_in_user():

def _get_user_from_cookie(c):
dbh = get_db()
dbh.set_character_set('utf8')
cur = MySQLdb.cursors.DictCursor(dbh)
cur.execute('SELECT first_name,last_name,email,institution,modeller_key '
'FROM servers.users WHERE user_name=%s '
Expand Down Expand Up @@ -381,7 +380,7 @@ def get_db():
db=app.config['DATABASE_DB'],
unix_socket=app.config['DATABASE_SOCKET'],
passwd=app.config['DATABASE_PASSWD'],
charset='utf8mb4', use_unicode=True)
charset='utf8', use_unicode=True)
return flask.g.db_conn


Expand Down Expand Up @@ -451,7 +450,6 @@ def render_queue_page():
if _request_wants_xml():
return flask.render_template('saliweb/help.xml')
conn = get_db()
conn.set_character_set('utf8')
c = MySQLdb.cursors.DictCursor(conn)
c.execute("SELECT * FROM jobs WHERE state != 'ARCHIVED' "
"AND state != 'EXPIRED' AND state != 'COMPLETED' "
Expand Down

0 comments on commit 95276bd

Please sign in to comment.