(form, rebuild_reason=None)
return len(case_ids)
Publishes changes for the form and rebuilds any touched cases.
Publishes changes for the form and rebuilds any touched cases.
Publishes changes for the form and rebuilds any touched cases .
def rebuild_case_changes(form, rebuild_reason=None):
    """
    Publishes changes for the form and rebuilds any touched cases.

    """
    domain = form.domain
    case_ids = get_case_ids_from_form(form)
    for case_id in case_ids:
        detail = FormReprocessRebuild(form_id=form.form_id)
        FormProcessorInterface(domain).hard_rebuild_case(case_id, detail)
        if LedgerAccessors(domain).get_ledger_values_for_case(case_id):
            with open('case_ids_with_ledgers.csv', 'a+') as f:
                print("{}, {}".format(domain, case_id), file=f)

    return len(case_ids)
def rebuild_case_changes ( form , rebuild_reason = None ) : domain = form . domain case_ids = get_case_ids_from_form ( form ) for case_id in case_ids : detail = FormReprocessRebuild ( form_id = form . form_id ) FormProcessorInterface ( domain ) . hard_rebuild_case ( case_id , detail ) if LedgerAccessors ( domain ) . get_ledger_values_for_case ( case_id ) : with open ( 'case_ids_with_ledgers.csv' , 'a+' ) as f : print ( "{}, {}" . format ( domain , case_id ) , file = f ) return len ( case_ids )