@bottle.post('/api/v3/report/<report_uuid>/attribute/<report_attribute>')
def post_report_attribute(report_uuid: ReportId, report_attribute: str, database: Database):
    'Set a report attribute.'
    data_model = latest_datamodel(database)
    reports = latest_reports(database)
    data = ReportData(data_model, reports, report_uuid)
    value = dict(bottle.request.json)[report_attribute]
    old_value = (data.report.get(report_attribute) or '')
    data.report[report_attribute] = value
    value_change_description = ('' if (report_attribute == 'layout') else f" from '{old_value}' to '{value}'")
    user = sessions.user(database)
    data.report['delta'] = dict(uuids=[report_uuid], email=user['email'], description=f"{user['user']} changed the {report_attribute} of report '{data.report_name}'{value_change_description}.")
    return insert_new_report(database, data.report)
Set a report attribute.
@bottle.post('/api/v3/report/<report_uuid>/attribute/<report_attribute>')
def post_report_attribute(report_uuid: ReportId, report_attribute: str, database: Database):
    
    data_model = latest_datamodel(database)
    reports = latest_reports(database)
    data = ReportData(data_model, reports, report_uuid)
    value = dict(bottle.request.json)[report_attribute]
    old_value = (data.report.get(report_attribute) or )
    data.report[report_attribute] = value
    value_change_description = ( if (report_attribute == 'layout') else f" from '{old_value}' to '{value}'")
    user = sessions.user(database)
    data.report['delta'] = dict(uuids=[report_uuid], email=user['email'], description=f"{user['user']} changed the {report_attribute} of report '{data.report_name}'{value_change_description}.")
    return insert_new_report(database, data.report)