Skip to content

Commit

Permalink
Fix Issue #311
Browse files Browse the repository at this point in the history
I'm running Django 4.0rc1 and have the same problem as described in issue #311. This fixes it for me.
  • Loading branch information
erdos4d authored Dec 7, 2021
1 parent f5978d4 commit ab738ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion health_check/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re

from django.http import HttpResponse, JsonResponse
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache
from django.views.generic import TemplateView

Expand Down Expand Up @@ -80,7 +81,7 @@ def __lt__(self, other):
class MainView(CheckMixin, TemplateView):
template_name = 'health_check/index.html'

@never_cache
@method_decorator(never_cache)
def get(self, request, *args, **kwargs):
status_code = 500 if self.errors else 200

Expand Down

0 comments on commit ab738ba

Please sign in to comment.