DRY update_attribs to use generic approach