aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-10-19 15:30:45 +0100
committerrubenwardy <rw@rubenwardy.com>2020-10-19 15:30:45 +0100
commit6503a820946a4b09bb6aeea65e850e7146f7c301 (patch)
treea79798ea3b59e842769682bb7eec37f861365a60
parent31f52580c28a7c8f4a7a7fe3af7b67e2ee633c6d (diff)
downloadcheatdb-6503a820946a4b09bb6aeea65e850e7146f7c301.tar.xz
Fix crash on email templating
-rw-r--r--app/template_filters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/template_filters.py b/app/template_filters.py
index 39d3806..6f31ea0 100644
--- a/app/template_filters.py
+++ b/app/template_filters.py
@@ -16,7 +16,7 @@ def inject_functions():
@app.context_processor
def inject_todo():
todo_list_count = None
- if current_user.is_authenticated and current_user.canAccessTodoList():
+ if current_user and current_user.is_authenticated and current_user.canAccessTodoList():
todo_list_count = Package.query.filter_by(state=PackageState.READY_FOR_REVIEW).count()
todo_list_count += PackageRelease.query.filter_by(approved=False, task_id=None).count()