]> git.lizzy.rs Git - cheatdb.git/commitdiff
Fix crash on email templating
authorrubenwardy <rw@rubenwardy.com>
Mon, 19 Oct 2020 14:30:45 +0000 (15:30 +0100)
committerrubenwardy <rw@rubenwardy.com>
Mon, 19 Oct 2020 14:30:45 +0000 (15:30 +0100)
app/template_filters.py

index 39d38065e454ec21850cb8ce0e8d281927e87396..6f31ea05ec0982b2f5563fd520e9e38637dbe330 100644 (file)
@@ -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()