fix cqi over socketio corpus.update_db command

This commit is contained in:
Patrick Jentsch 2023-05-15 14:28:27 +02:00
parent fbf663fee3
commit 202700b129

View File

@ -38,7 +38,7 @@ def cqi_corpora_corpus_query(cqi_client: cqi.CQiClient, corpus_name: str, subcor
@cqi_over_socketio @cqi_over_socketio
def cqi_corpora_corpus_update_db(cqi_client: cqi.CQiClient, corpus_name: str): def cqi_corpora_corpus_update_db(cqi_client: cqi.CQiClient, corpus_name: str):
corpus = Corpus.query.get(session['d']['corpus_id']) corpus = Corpus.query.get(session['d']['corpus_id'])
corpus.num_tokens = cqi_client.corpora.get('CORPUS').attrs['size'] corpus.num_tokens = cqi_client.corpora.get(corpus_name).attrs['size']
db.session.commit() db.session.commit()