def dispatch(self, request, pid=None, *args, **kwargs):
        pid = self.kwargs['pid']
        self.problem = get_object_or_404(Problem.objects.all(), pk=pid)
        return super(SubmissionCreateView, self).dispatch(request, *args, **kwargs)