Browse Source

Fix marking a game featured

Colin Powell 3 years ago
parent
commit
c5404be5e8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      games/views.py

+ 2 - 2
games/views.py

@@ -37,10 +37,10 @@ class RecentGameList(LoginRequiredMixin, ListView):
                 .first()
             )
             cache.set("todays_game_id", todays_game.id, settings.FEATURED_GAME_DURATION)
+            todays_game.featured_on = datetime.now()
+            todays_game.save(update_fields=["featured_on"])
         else:
             todays_game = Game.objects.get(id=cached_game_id)
-            todays_game.featured_on = datetime.now().date
-            todays_game.save(update_fields=["featured_on"])
 
         return super(RecentGameList, self).get_context_data(
             todays_game=todays_game,