Skip to content

Commit

Permalink
Hotfix #213 again
Browse files Browse the repository at this point in the history
  • Loading branch information
twd2 committed Jul 25, 2017
1 parent 5738b6e commit 7bd91e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vj4/handler/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def get(self, *, start: str='', uid_or_name: str='', pid: str='', tid: str
[('uid_or_name', uid_or_name), ('pid', pid), ('tid', tid)])
self.render('record_main.html', rdocs=rdocs, udict=udict, pdict=pdict, statistics=statistics,
filter_uid_or_name=uid_or_name, filter_pid=pid, filter_tid=tid,
socket_url=url_prefix + '/records-conn?' + query_string,
socket_url=url_prefix + '/records-conn?' + query_string, # FIXME(twd2): magic
query_string=query_string)


Expand Down Expand Up @@ -163,9 +163,10 @@ async def get(self, *, rid: objectid.ObjectId):
# check permission for visibility: hidden problem
if pdoc.get('hidden', False) and not self.has_perm(builtin.PERM_VIEW_PROBLEM_HIDDEN):
pdoc = None
url_prefix = '/d/{}'.format(urllib.parse.quote(self.domain_id))
self.render('record_detail.html', rdoc=rdoc, udoc=udoc, dudoc=dudoc, pdoc=pdoc, tdoc=tdoc,
judge_udoc=judge_udoc, show_status=show_status,
socket_url='/records/{}/conn'.format(rid))
socket_url=url_prefix + '/records/{}/conn'.format(rid)) # FIXME(twd2): magic


@app.connection_route('/records/{rid}/conn', 'record_detail-conn')
Expand Down

0 comments on commit 7bd91e9

Please sign in to comment.