Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion judge/views/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from collections import namedtuple
from itertools import groupby
from operator import attrgetter
from urllib.parse import urlparse

from django.conf import settings
from django.contrib.auth.decorators import login_required
Expand Down Expand Up @@ -313,7 +314,7 @@ def get(self, request, *args, **kwargs):
response['Content-Type'] = 'application/octet-stream'
response['Content-Disposition'] = 'attachment; filename=%s_%s_%s.%s' % (problem_code, username, id, ext)

url_path = submission.source.source
url_path = urlparse(submission.source.source).path
if not url_path.startswith('/'):
url_path = '/' + url_path

Expand Down
Loading