app/soc/views/models/base.py
changeset 1424 f8c762a33a43
parent 1414 69c812b91d37
child 1427 00a118a442f7
equal deleted inserted replaced
1423:54960277c85d 1424:f8c762a33a43
   670 
   670 
   671     # If this entity is unscoped, do not try to retrieve a scope
   671     # If this entity is unscoped, do not try to retrieve a scope
   672     if 'scope_path' not in fields:
   672     if 'scope_path' not in fields:
   673       return
   673       return
   674 
   674 
   675     scope = self._params['scope_logic'].logic.getFromKeyName(
   675     if entity:
   676         fields['scope_path'])
   676       fields['scope'] = entity.scope
   677     fields['scope'] = scope
   677     else:
       
   678       scope = self._params['scope_logic'].logic.getFromKeyName(
       
   679           fields['scope_path'])
       
   680       fields['scope'] = scope
   678 
   681 
   679   def _public(self, request, entity, context):
   682   def _public(self, request, entity, context):
   680     """Performs any required processing to get an entity's public page.
   683     """Performs any required processing to get an entity's public page.
   681 
   684 
   682     Args:
   685     Args: