(case_ids, form_id)
Delete LedgerTransactions for form.
        :param case_ids: list of case IDs which ledger transactions belong to (required for correct sharding)
        :param form_id:  ID of the form
        :return: number of transactions deleted
Delete LedgerTransactions for form.
        :param case_ids: list of case IDs which ledger transactions belong to (required for correct sharding)
        :param form_id:  ID of the form
        :return: number of transactions deleted
Delete LedgerTransactions for form . : param case_ids : list of case IDs which ledger transactions belong to ( required for correct sharding ) : param form_id : ID of the form : return : number of transactions deleted
def delete_ledger_transactions_for_form(case_ids, form_id):
        """
        Delete LedgerTransactions for form.
        :param case_ids: list of case IDs which ledger transactions belong to (required for correct sharding)
        :param form_id:  ID of the form
        :return: number of transactions deleted
        """
        assert isinstance(case_ids, list)
        with LedgerTransaction.get_plproxy_cursor() as cursor:
            cursor.execute(
                "SELECT delete_ledger_transactions_for_form(%s, %s) as deleted_count",
                [case_ids, form_id]
            )
            results = fetchall_as_namedtuple(cursor)
            return sum([result.deleted_count for result in results])
def delete_ledger_transactions_for_form ( case_ids , form_id ) : assert isinstance ( case_ids , list ) with LedgerTransaction . get_plproxy_cursor ( ) as cursor : cursor . execute ( "SELECT delete_ledger_transactions_for_form(%s, %s) as deleted_count" , [ case_ids , form_id ] ) results = fetchall_as_namedtuple ( cursor ) return sum ( [ result . deleted_count for result in results ] )