Skip to content

Version 0-14-0 : Validation report in JSON format is not created. #1501

Description

@HajimeShimizu

Version 0.14.0

When JSON format is selected as report format (-of = 'JSON'), error fires.

AttributeError: 'JsonReport' object has no attribute '_results'

I checked the log and found issue in "\cdisc_rules_engine\services\reporting\json_report.py", line 62, def get_export.

    def get_export(
        self,
        raw_report=False,
    ) -> dict:
        ....
        if raw_report:
            json_export["results_data"] = [
                rule_result.to_representation() for rule_result in self._results  # <-- self._results is not valid attribute !!
            ]
        return json_export

The code should be as follows because data structure is updated in this version. I tested this new code and it works in my environment.

            json_export["results_data"] = [
            rule_result.to_representation() for rule_result in self._report_standard._results  # <-- _results is in _report_standard
            ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

T-shirt sizing

None yet

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions