From 165b34d74aff31f6266cc897fc309dfa7f6f2b94 Mon Sep 17 00:00:00 2001 From: Lucas Schumacher Date: Sun, 19 May 2024 15:43:43 -0400 Subject: [PATCH] Cleanup last commit and remove potential bug --- testapp/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testapp/views.py b/testapp/views.py index 15ca5a6..1aa865b 100644 --- a/testapp/views.py +++ b/testapp/views.py @@ -10,8 +10,7 @@ def index_view(request): click_count = ClickCount.objects.first() # If the click_count is None, then we have not yet clicked if click_count is None: - click_count = ClickCount(1) - click_count.save() + click_count = ClickCount(0) # Increment the click count click_count.clicks += 1 click_count.save()