Cleanup last commit and remove potential bug

This commit is contained in:
Lucas Schumacher 2024-05-19 15:43:43 -04:00
parent 86d2990dfa
commit 165b34d74a

View File

@ -10,8 +10,7 @@ def index_view(request):
click_count = ClickCount.objects.first() click_count = ClickCount.objects.first()
# If the click_count is None, then we have not yet clicked # If the click_count is None, then we have not yet clicked
if click_count is None: if click_count is None:
click_count = ClickCount(1) click_count = ClickCount(0)
click_count.save()
# Increment the click count # Increment the click count
click_count.clicks += 1 click_count.clicks += 1
click_count.save() click_count.save()