Commit 6b71e095 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Show just the todos belonging to the current user

If there are todos which have todo.who == current_user.username, show
only them, as there may be quite a lot of open todos in total.

/close #90
parent e5408a22
......@@ -175,6 +175,12 @@ def index():
if todo.protocoltype.has_private_view_right(user)
and not todo.is_done()
user_todos = [
todo for todo in todos
if user.username.lower() in list(map(str.strip, todo.who.lower().split(",")))
if len(user_todos) > 0:
todos = user_todos
def _todo_sort_key(todo):
protocol = todo.get_first_protocol()
return if protocol is not None and is not None else
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment