Fix some things

This commit is contained in:
Stephan Porada 2019-10-29 09:51:47 +01:00
parent f4c7af02ad
commit 5f29112390
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ def background_task(app, user_id, session_id, foreign=False):
' > where '*' is either 'corpora' or 'jobs'
'''
with app.app_context():
user = db.session.query(User).filter_by(id=user_id).first()
user = db.session.query(User).get_or_404(user_id)
''' Get current values from the database. '''
corpora = user.corpora_as_dict()
jobs = user.jobs_as_dict()

View File

@ -41,8 +41,8 @@
<div class="col s12 m6">
<div id="job-foreign-list">
<div class="card">
<span class="card-title">User Jobs</span>
<div class="card-content">
<span class="card-title">User Jobs</span>
<div class="row">
<div class="col s12">
<div class="input-field">
@ -73,8 +73,8 @@
<div class="col s12 m6">
<div id="corpus-foreign-list">
<div class="card">
<span class="card-title">User Corpora</span>
<div class="card-content">
<span class="card-title">User Corpora</span>
<div class="row">
<div class="col s12">
<div class="input-field">