Skip to content

Commit

Permalink
Merge pull request #790 from starteam/student_image_url_fix
Browse files Browse the repository at this point in the history
Added logic to remove query params from image url in student view
  • Loading branch information
blarghmatey authored Mar 13, 2018
2 parents e99769c + 9af592f commit 7b9e244
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion instructor/compiler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from urlparse import urlparse, urlunparse
from django.db.models import Q
from django.utils.html import format_html, format_html_join
from instructor.models import (
Expand Down Expand Up @@ -362,7 +363,8 @@ def micro_model(a):
def generate_slides(assignment):
ret = {}
for image in assignment.image.all():
ret[image.id] = image.file.url
image_url = urlparse(image.file.url)._replace(query=None)
ret[image.id] = urlunparse(image_url)
return ret


Expand Down

0 comments on commit 7b9e244

Please sign in to comment.