Fixed bug in StudentProposal update when a StudentProposal had no Mentor.
--- a/app/soc/tasks/updates/module_conversion.py Sun Oct 18 16:27:22 2009 +0200
+++ b/app/soc/tasks/updates/module_conversion.py Sun Oct 18 16:33:05 2009 +0200
@@ -292,12 +292,14 @@
for entity in entities:
entity.scope = student_logic.getFromKeyName(
entity.scope.key().id_or_name())
- entity.mentor = mentor_logic.getFromKeyName(
- entity.mentor.key().id_or_name())
entity.org = org_logic.getFromKeyName(entity.org.key().id_or_name())
entity.program = program_logic.getFromKeyName(
entity.program.key().id_or_name())
+ if entity.mentor:
+ entity.mentor = mentor_logic.getFromKeyName(
+ entity.mentor.key().id_or_name())
+
old_mentors = entity.possible_mentors
new_mentors = []
@@ -314,7 +316,6 @@
return
-
@decorators.iterative_task(review_logic)
def runReviewUpdate(request, entities, context, *args, **kwargs):
"""AppEngine Task that updates Review entities.