From d9f1a8fcb416e44e19224a550faae2c42b4676b7 Mon Sep 17 00:00:00 2001 From: Scot Hacker Date: Sun, 10 Apr 2016 23:48:44 -0700 Subject: [PATCH] Use True, not 1 --- todo/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo/views.py b/todo/views.py index 7961745..40bb46b 100644 --- a/todo/views.py +++ b/todo/views.py @@ -91,7 +91,7 @@ def view_list(request, list_id=0, list_slug=None, view_completed=False): # Make sure the accessing user has permission to view this list. # Always authorize the "mine" view. Admins can view/edit all lists. if list_slug == "mine" or list_slug == "recent-add" or list_slug == "recent-complete": - auth_ok = 1 + auth_ok = True else: list = get_object_or_404(List, slug=list_slug) listid = list.id @@ -106,7 +106,7 @@ def view_list(request, list_id=0, list_slug=None, view_completed=False): done_items = request.POST.getlist('mark_done') for item in done_items: i = Item.objects.get(id=item) - i.completed = 1 + i.completed = True i.completed_date = datetime.datetime.now() i.save() messages.success(request, "Item \"{i}\" marked complete.".format(i=i.title))