(cls, rule_id)
return list(cls.objects.filter(action_id=action_id).values_list('case_id', flat=True))
Given a AutomaticUpdateRule id, return all case_ids that match
Given a AutomaticUpdateRule id, return all case_ids that match
Given a AutomaticUpdateRule id return all case_ids that match
def get_case_ids(cls, rule_id):
        """Given a AutomaticUpdateRule id, return all case_ids that match
        """
        try:
            rule = AutomaticUpdateRule.objects.get(
                id=rule_id,
                workflow=AutomaticUpdateRule.WORKFLOW_DEDUPLICATE,
                deleted=False
            )
        except AutomaticUpdateRule.DoesNotExist:
            return []
        action_id = CaseDeduplicationActionDefinition.from_rule(rule).id
        return list(cls.objects.filter(action_id=action_id).values_list('case_id', flat=True))
def get_case_ids ( cls , rule_id ) : try : rule = AutomaticUpdateRule . objects . get ( id = rule_id , workflow = AutomaticUpdateRule . WORKFLOW_DEDUPLICATE , deleted = False ) except AutomaticUpdateRule . DoesNotExist : return [ ] action_id = CaseDeduplicationActionDefinition . from_rule ( rule ) . id return list ( cls . objects . filter ( action_id = action_id ) . values_list ( 'case_id' , flat = True ) )