Compare commits

..

No commits in common. "b16fe7d68e48d58c6e9ce553c7c4363704189ae7" and "70f391420cd0faf9655034c23a03896bc59a6d55" have entirely different histories.

2 changed files with 3 additions and 7 deletions

View File

@ -4,7 +4,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.db.models import Q from django.db.models import Q
from django.http import FileResponse, Http404 from django.http import FileResponse
from django.shortcuts import redirect from django.shortcuts import redirect
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils import timezone from django.utils import timezone
@ -188,11 +188,7 @@ class DocumentView(LoginRequiredMixin, View):
""" """
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
try:
doc = Document.objects.get(file=self.kwargs["file"]) doc = Document.objects.get(file=self.kwargs["file"])
except Document.DoesNotExist:
raise Http404(_("No %(verbose_name)s found matching the query") %
{'verbose_name': Document._meta.verbose_name})
grant = request.user.admin grant = request.user.admin

View File

@ -328,7 +328,7 @@ class SolutionsView(TeamMixin, BaseFormView, SingleTableView):
self.object_list = self.get_queryset() self.object_list = self.get_queryset()
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
context["now"] = timezone.now() context["now"] = timezone.now()
context["real_deadline"] = self.request.user.team.future_tournament.date_solutions + timedelta(minutes=30) context["real_deadline"] = self.request.user.team.tournament.date_solutions + timedelta(minutes=30)
return context return context
def get_queryset(self): def get_queryset(self):