app/soc/views/models/base.py
changeset 1424 f8c762a33a43
parent 1414 69c812b91d37
child 1427 00a118a442f7
--- a/app/soc/views/models/base.py	Sat Feb 21 10:57:02 2009 +0000
+++ b/app/soc/views/models/base.py	Sat Feb 21 11:02:59 2009 +0000
@@ -672,9 +672,12 @@
     if 'scope_path' not in fields:
       return
 
-    scope = self._params['scope_logic'].logic.getFromKeyName(
-        fields['scope_path'])
-    fields['scope'] = scope
+    if entity:
+      fields['scope'] = entity.scope
+    else:
+      scope = self._params['scope_logic'].logic.getFromKeyName(
+          fields['scope_path'])
+      fields['scope'] = scope
 
   def _public(self, request, entity, context):
     """Performs any required processing to get an entity's public page.