def publish_article(article, language, changed_by=None):
    """
    Publish an article. This sets `article.published` to `True`
    and calls article.publish() which does the actual publishing.
    """
    article = article.reload()

    # get username
    if changed_by:
        username = changed_by.get_username()
    else:
        username = 'script'

    with current_user(username):
        article.publish(language)

    return article.reload()