# HG changeset patch # User Sverre Rabbelier # Date 1228565599 0 # Node ID c8f24e3078b86ed4b674164fc7be49a19bf1457d # Parent c6433532ddffaa860a16f9ffd86c7960b61bd193 Fix scope lookup for unscoped entities As scope_logic is now always set (since r1250), we need to check if it is None, rather than check if it exists. Patch by: Sverre Rabbelier diff -r c6433532ddff -r c8f24e3078b8 app/soc/views/models/base.py --- 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.