74 |
74 |
75 def _editPost(self, request, entity, fields): |
75 def _editPost(self, request, entity, fields): |
76 """See base.View._editPost(). |
76 """See base.View._editPost(). |
77 """ |
77 """ |
78 |
78 |
|
79 prefix = self._params['document_prefix'] |
79 key_fields = self._logic.getKeyFieldsFromDict(fields) |
80 key_fields = self._logic.getKeyFieldsFromDict(fields) |
80 scope_path = self._logic.getKeyNameForFields(key_fields) |
81 scope_path = self._logic.getKeyNameForFields(key_fields) |
81 |
82 |
82 tos_link_id = fields['tos_link_id'] |
83 tos_link_id = fields['tos_link_id'] |
83 |
84 |
84 # TODO notify the user if tos_doc is not found |
85 # TODO notify the user if tos_doc is not found |
85 tos_doc = document_logic.logic.getFromFields( |
86 tos_doc = document_logic.logic.getFromFields( |
86 scope_path=scope_path, link_id=tos_link_id) |
87 scope_path=scope_path, link_id=tos_link_id, prefix=prefix) |
87 |
88 |
88 fields['tos'] = tos_doc |
89 fields['tos'] = tos_doc |
89 |
90 |
90 super(View, self)._editPost(request, entity, fields) |
91 super(View, self)._editPost(request, entity, fields) |