'Rate a dataset asynchronously and return updated community data.'

@web.expose
@web.require_login('rate    items')
@web.json
def rate_async(self, trans, id, rating):

    decoded_id = self.decode_id(id)
    dataset = self.hda_manager.get_accessible(decoded_id, trans.user)
    dataset = self.hda_manager.error_if_uploading(dataset)
    if (not dataset):
        return trans.show_error_message('The    specified    dataset    does    not    exist.')
    self.rate_item(trans.sa_session, trans.get_user(), dataset, rating)
    return self.get_ave_item_rating_data(trans.sa_session, dataset)
