@must_be_logged_in
def unserialize_social(auth, **kwargs):

    verify_user_match(auth, **kwargs)

    user = auth.user
    json_data = escape_html(request.get_json())

    for soc in user.SOCIAL_FIELDS.keys():
        user.social[soc] = json_data.get(soc)

    try:
        user.save()
    except __HOLE__ as exc:
        raise HTTPError(http.BAD_REQUEST, data=dict(
            message_long=exc.args[0]
        ))
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/profile/views.py/unserialize_social