app/soc/views/models/student_proposal.py
changeset 2160 3f9dd37d98a8
parent 2150 5c125051252e
child 2173 27731db8ab1e
--- a/app/soc/views/models/student_proposal.py	Sat Apr 11 22:57:23 2009 +0000
+++ b/app/soc/views/models/student_proposal.py	Sat Apr 11 22:58:19 2009 +0000
@@ -397,7 +397,7 @@
       # create the fields that should be in the ReviewFollower entity
       fields = {'link_id': user_entity.link_id,
                 'scope': entity,
-                'scope_path': entity.key().name(),
+                'scope_path': entity.key().id_or_name(),
                 'user': user_entity
                }
       # get the keyname for the ReviewFollower entity
@@ -548,7 +548,7 @@
     list_params['list_description'] = ('List of %(name_plural)s you can send '
         'your proposal to.') % list_params
     list_params['list_action'] = (redirects.getStudentProposalRedirect,
-        {'student_key': student_entity.key().name(),
+        {'student_key': student_entity.key().id_or_name(),
             'url_name': params['url_name']})
 
     return self.list(request, access_type=access_type, page_name=page_name,
@@ -795,7 +795,7 @@
       # create the fields that should be in the ReviewFollower entity
       fields = {'link_id': user_entity.link_id,
                 'scope': entity,
-                'scope_path': entity.key().name(),
+                'scope_path': entity.key().id_or_name(),
                 'user': user_entity
                }
       # get the keyname for the ReviewFollower entity
@@ -895,8 +895,8 @@
       mentor_names = []
 
       for mentor_key in possible_mentors:
-        possible_mentor = mentor_logic.logic.getFromKeyName(mentor_key.name())
-        mentor_names.append(possible_mentor.name())
+        possible_mentor = mentor_logic.logic.getFromKeyName(mentor_key.id_or_name())
+        mentor_names.append(possible_mentor.id_or_name())
 
       context['possible_mentors'] = ', '.join(mentor_names)
 
@@ -1015,7 +1015,7 @@
     # create the fields for the review entity
     fields = {'link_id': 't%i' % (int(time.time()*100)),
         'scope': entity,
-        'scope_path': entity.key().name(),
+        'scope_path': entity.key().id_or_name(),
         'author': user_logic.logic.getForCurrentAccount(),
         'content': comment,
         'is_public': is_public,