def update_object_with_data(content, record):
<EOL>content = get_object(content)<EOL>dm = IDataManager(content)<EOL>if dm is None:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>for k, v in list(record.items()):<EOL><INDENT>try:<EOL><INDENT>success = dm.set(k, v, **record)<EOL><DEDENT>except Unauthorized:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>" % k)<EOL><DEDENT>except ValueError as exc:<EOL><INDENT>fail(<NUM_LIT>, str(exc))<EOL><DEDENT>if not success:<EOL><INDENT>logger.warn("<STR_LIT>", k)<EOL>continue<EOL><DEDENT>logger.debug("<STR_LIT>", k)<EOL><DEDENT>invalid = validate_object(content, record)<EOL>if invalid:<EOL><INDENT>fail(<NUM_LIT>, u.to_json(invalid))<EOL><DEDENT>if record.get("<STR_LIT>", None):<EOL><INDENT>t = record.get("<STR_LIT>")<EOL>logger.debug("<STR_LIT>", t, content.getId())<EOL>do_transition_for(content, t)<EOL><DEDENT>content.reindexObject()<EOL>return content<EOL>
Update the content with the record data

    :param content: A single folderish catalog brain or content object
    :type content: ATContentType/DexterityContentType/CatalogBrain
    :param record: The data to update
    :type record: dict
    :returns: The updated content object
    :rtype: object
    :raises:
        APIError,
        :class:`~plone.jsonapi.routes.exceptions.APIError`