app/soc/views/models/base.py
changeset 677 c8f24e3078b8
parent 668 77f9a6ea6e67
child 701 d6f5d34cff5a
--- a/app/soc/views/models/base.py	Sat Dec 06 12:12:58 2008 +0000
+++ b/app/soc/views/models/base.py	Sat Dec 06 12:13:19 2008 +0000
@@ -508,7 +508,7 @@
     """
 
     # If scope_logic is not defined, this entity has no scope
-    if 'scope_logic' not in self._params:
+    if not self._params['scope_logic']:
       return
 
     scope = self._params['scope_logic'].logic.getFromKeyName(fields['scope_path'])
@@ -535,7 +535,8 @@
     """
 
     # fill in the email field with the data from the entity
-    form.fields['scope_path'].initial = entity.scope_path
+    if 'scope_path' in form.fields:
+      form.fields['scope_path'].initial = entity.scope_path
 
   def _editSeed(self, request, seed):
     """Performs any required processing on the form to get its edit page.