(self, domain, rule, duplicate_case_ids)
return len(case_updates)
Updates all the duplicate cases according to the rule
Updates all the duplicate cases according to the rule
Updates all the duplicate cases according to the rule
def _update_cases(self, domain, rule, duplicate_case_ids):
        """Updates all the duplicate cases according to the rule
        """
        duplicate_cases = CaseAccessors(domain).get_cases(list(duplicate_case_ids))
        case_updates = self._get_case_updates(duplicate_cases)
        for case_update_batch in chunked(case_updates, 100):
            result = bulk_update_cases(
                domain,
                case_update_batch,
                device_id="CaseDeduplicationActionDefinition-update-cases",
                xmlns=get_dedupe_xmlns(rule),
            )
            rule.log_submission(result[0].form_id)
        return len(case_updates)
def _update_cases ( self , domain , rule , duplicate_case_ids ) : duplicate_cases = CaseAccessors ( domain ) . get_cases ( list ( duplicate_case_ids ) ) case_updates = self . _get_case_updates ( duplicate_cases ) for case_update_batch in chunked ( case_updates , 100 ) : result = bulk_update_cases ( domain , case_update_batch , device_id = "CaseDeduplicationActionDefinition-update-cases" , xmlns = get_dedupe_xmlns ( rule ) , ) rule . log_submission ( result [ 0 ] . form_id ) return len ( case_updates )