Esempio n. 1
0
    def update_action(self, user_id, action_id, patch_doc):
        valid_patch = ActionDoc.create_patch(patch_doc)

        # check that document exists
        assert (self.action_manager.get(user_id, action_id))

        version = self.action_manager.update(action_id, valid_patch)
        logging.info(_i18n._LI('Action %(id)s updated to version %(version)s' %
                     {'id': action_id, 'version': version}))
        return version