diff --git a/app/main/events.py b/app/main/events.py index 2e84f61a..960db923 100644 --- a/app/main/events.py +++ b/app/main/events.py @@ -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() diff --git a/app/templates/admin/admin_user_page.html.j2 b/app/templates/admin/admin_user_page.html.j2 index c37f08f0..56b98599 100644 --- a/app/templates/admin/admin_user_page.html.j2 +++ b/app/templates/admin/admin_user_page.html.j2 @@ -41,8 +41,8 @@
- User Jobs
+ User Jobs
@@ -73,8 +73,8 @@
- User Corpora
+ User Corpora