(request, domain, app_id, module_unique_id)
return json_response('success')
Overwrite module case details. Only overwrites components that have been
    provided in the request. Components are short, long, filter, parent_select,
    and sort_elements.
Overwrite module case details. Only overwrites components that have been
    provided in the request. Components are short, long, filter, parent_select,
    and sort_elements.
Overwrite module case details . Only overwrites components that have been provided in the request . Components are short long filter parent_select and sort_elements .
def edit_report_module(request, domain, app_id, module_unique_id):
    """
    Overwrite module case details. Only overwrites components that have been
    provided in the request. Components are short, long, filter, parent_select,
    and sort_elements.
    """
    params = json_request(request.POST)
    app = get_app(domain, app_id)

    try:
        module = app.get_module_by_unique_id(module_unique_id)
    except ModuleNotFoundException:
        # temporary fallback
        module = app.get_module(module_unique_id)

    assert isinstance(module, ReportModule)
    module.name = params['name']
    module.report_context_tile = params['report_context_tile']

    try:
        module.report_configs = [ReportAppConfig.wrap(spec) for spec in params['reports']]
    except Exception:
        notify_exception(
            request,
            message="Something went wrong while editing report modules",
            details={'domain': domain, 'app_id': app_id, }
        )
        return HttpResponseBadRequest(_("There was a problem processing your request."))

    if app.enable_module_filtering:
        module['module_filter'] = request.POST.get('module_filter')

    module.media_image.update(params['multimedia']['mediaImage'])
    module.media_audio.update(params['multimedia']['mediaAudio'])

    try:
        app.save()
    except Exception:
        notify_exception(
            request,
            message="Something went wrong while saving app {} while editing report modules".format(app_id),
            details={'domain': domain, 'app_id': app_id, }
        )
        return HttpResponseBadRequest(_("There was a problem processing your request."))

    return json_response('success')
def edit_report_module ( request , domain , app_id , module_unique_id ) : params = json_request ( request . POST ) app = get_app ( domain , app_id ) try : module = app . get_module_by_unique_id ( module_unique_id ) except ModuleNotFoundException : # temporary fallback module = app . get_module ( module_unique_id ) assert isinstance ( module , ReportModule ) module . name = params [ 'name' ] module . report_context_tile = params [ 'report_context_tile' ] try : module . report_configs = [ ReportAppConfig . wrap ( spec ) for spec in params [ 'reports' ] ] except Exception : notify_exception ( request , message = "Something went wrong while editing report modules" , details = { 'domain' : domain , 'app_id' : app_id , } ) return HttpResponseBadRequest ( _ ( "There was a problem processing your request." ) ) if app . enable_module_filtering : module [ 'module_filter' ] = request . POST . get ( 'module_filter' ) module . media_image . update ( params [ 'multimedia' ] [ 'mediaImage' ] ) module . media_audio . update ( params [ 'multimedia' ] [ 'mediaAudio' ] ) try : app . save ( ) except Exception : notify_exception ( request , message = "Something went wrong while saving app {} while editing report modules" . format ( app_id ) , details = { 'domain' : domain , 'app_id' : app_id , } ) return HttpResponseBadRequest ( _ ( "There was a problem processing your request." ) ) return json_response ( 'success' )