app/soc/views/helper/access.py
changeset 995 886c981fda2c
parent 992 e9f7d8e96b20
child 996 a6f67d4c297f
--- a/app/soc/views/helper/access.py	Sun Jan 25 22:15:13 2009 +0000
+++ b/app/soc/views/helper/access.py	Sun Jan 25 22:30:42 2009 +0000
@@ -385,7 +385,7 @@
 
 def checkIsHostForProgram(kwargs):
   """Raises an alternate HTTP response if Google Account has no Host entity
-     for the specified program.
+     for the specified Sponsor.
 
   Args:
     request: a Django HTTP request
@@ -402,8 +402,13 @@
 
   user = user_logic.getForCurrentAccount()
 
+  if kwargs.get('scope_path'):
+    scope_path = kwargs['scope_path']
+  else:
+    scope_path = kwargs['link_id']
+
   fields = {'user': user,
-            'scope_path': kwargs['scope_path'],
+            'scope_path': scope_path,
             'state': 'active'}
 
   host = host_logic.getForFields(fields, unique=True)