app/soc/views/models/presence.py
changeset 1115 0a723ff3d27c
parent 1101 6c0f9b73b053
child 1218 569a3fe9cb88
equal deleted inserted replaced
1114:65c8d1bfe94b 1115:0a723ff3d27c
   134 
   134 
   135   def _editPost(self, request, entity, fields):
   135   def _editPost(self, request, entity, fields):
   136     """See base.View._editPost().
   136     """See base.View._editPost().
   137     """
   137     """
   138 
   138 
   139     prefix = self._params['document_prefix']
   139     key_fields = self._logic.getKeyFieldsFromFields(fields)
   140     key_fields = self._logic.getKeyFieldsFromDict(fields)
   140     scope_path = self._logic.getKeyNameFromFields(key_fields)
   141     scope_path = self._logic.getKeyNameForFields(key_fields)
   141 
   142     home_link_id = fields['home_link_id']
   142     key_fields = {
       
   143         'scope_path': scope_path,
       
   144         'link_id': fields['home_link_id'],
       
   145         'prefix': self._params['document_prefix'],
       
   146         }
   143 
   147 
   144     # TODO notify the user if home_doc is not found
   148     # TODO notify the user if home_doc is not found
   145     home_doc = document_logic.logic.getFromFields(
   149     home_doc = document_logic.logic.getFromKeyFields(key_fields)
   146       scope_path=scope_path, link_id=home_link_id, prefix=prefix)
       
   147 
   150 
   148     fields['home'] = home_doc
   151     fields['home'] = home_doc
   149 
   152 
   150     super(View, self)._editPost(request, entity, fields)
   153     super(View, self)._editPost(request, entity, fields)