Пример #1
0
 def _process_PATCH(self, text, internal):
     updates = {}
     if text is not None:
         updates['text'] = text
     if internal is not None and self._user_is_authorized_editor():
         updates['internal'] = internal
     if updates:
         update_revision_comment(self.comment, updates)
     return '', 204
Пример #2
0
 def _process_PATCH(self, text, internal):
     updates = {}
     if text is not None:
         updates['text'] = text
     if internal is not None and self.editable.can_use_internal_comments(session.user):
         updates['internal'] = internal
     if updates:
         update_revision_comment(self.comment, updates)
     return '', 204