

def handle_media_edits(request, item, should_edit, resp, lang):
    if ('corrections' not in resp):
        resp['corrections'] = {
            
        }
    for attribute in ('media_image', 'media_audio'):
        if should_edit(attribute):
            media_path = process_media_attribute(attribute, resp, request.POST.get(attribute))
            item._set_media(attribute, lang, should_edit)

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/views/media_utils.py handle_media_edits/VarMisuse@84/115 `media_path`->`should_edit`