Compare commits

..

No commits in common. '3ce30cf5f751e292aa2c8b2273d607deafa14999' and '08fd01e119f70f5643ebb08e118757378c8e680c' have entirely different histories.

  1. 8
      tournaments/views.py

@ -69,12 +69,6 @@ from .models import AnimationType
logger = logging.getLogger(__name__)
def get_object(type, id):
try:
return type.objects.get(pk=id)
except (type.DoesNotExist, ValueError, ValidationError):
raise Http404(f"{type.__name__} does not exist")
def index(request):
now = timezone.now()
thirty_days_ago = now - timedelta(days=30)
@ -124,7 +118,7 @@ def tournaments_query(query, club_id, ascending, limit=None):
club = None
if club_id:
club = get_object(Club, club_id)
club = get_object_or_404(Club, pk=club_id)
q_club = Q(event__club=club)
queries.append(q_club)
else:

Loading…
Cancel
Save