--- 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)