Use scope_path for updating Documents since scope was never properly set.
--- a/app/soc/tasks/updates/module_conversion.py Sun Oct 18 16:53:59 2009 +0200
+++ b/app/soc/tasks/updates/module_conversion.py Sun Oct 18 17:00:37 2009 +0200
@@ -510,18 +510,18 @@
context: the context of this task
"""
+ import logging
from soc.modules.gsoc.logic.models.organization import logic as org_logic
from soc.modules.gsoc.logic.models.program import logic as program_logic
for entity in entities:
if entity.prefix == 'org':
- org_entity = org_logic.getFromKeyName(entity.scope.key().id_or_name())
+ org_entity = org_logic.getFromKeyName(entity.scope_path)
entity.scope = org_entity
entity.home_for = org_entity if entity.home_for else None
if entity.prefix == 'program':
- program_entity = program_logic.getFromKeyName(
- entity.scope.key().id_or_name())
+ program_entity = program_logic.getFromKeyName(entity.scope_path)
entity.scope = program_entity
entity.home_for = program_entity if entity.home_for else None