Merged in [9097] from rcross@amsl.com:
Fixes #1605. Editing session request causes KeyError.
- Legacy-Id: 9120
Note: SVN reference [9097] has been migrated to Git commit a660c433bb
This commit is contained in:
parent
219a2ea204
commit
048319edbc
|
@ -168,13 +168,14 @@ def agenda_permissions(meeting, schedule, user):
|
|||
|
||||
return cansee, canedit, secretariat
|
||||
|
||||
def session_constraint_expire(session):
|
||||
def session_constraint_expire(request,session):
|
||||
from django.core.urlresolvers import reverse
|
||||
from ajax import session_constraints
|
||||
path = reverse(session_constraints, args=[session.meeting.number, session.pk])
|
||||
request = HttpRequest()
|
||||
request.path = path
|
||||
key = get_cache_key(request)
|
||||
temp_request = HttpRequest()
|
||||
temp_request.path = path
|
||||
temp_request.META['HTTP_HOST'] = request.META['HTTP_HOST']
|
||||
key = get_cache_key(temp_request)
|
||||
if key is not None and cache.has_key(key):
|
||||
cache.delete(key)
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ def edit_mtg(request, num, acronym):
|
|||
|
||||
# nuke any cache that might be lingering around.
|
||||
from ietf.meeting.helpers import session_constraint_expire
|
||||
session_constraint_expire(session)
|
||||
session_constraint_expire(request,session)
|
||||
|
||||
messages.success(request, 'Session Request updated')
|
||||
return redirect('sessions_view', acronym=acronym)
|
||||
|
|
Loading…
Reference in a new issue