(self)
return response
Used for creating case-based exports.
Used for creating case-based exports.
Used for creating case - based exports .
def get_case_rmi_response(self):
        """
        Used for creating case-based exports.
        """
        apps_by_type = self._get_applications_by_type(as_dict=False)
        case_types_by_app = self._get_cases_for_apps(apps_by_type, self.as_dict)
        # If there are Unknown case types, ensure that there exists an Unknown Application
        if case_types_by_app.get(self.UNKNOWN_SOURCE) and not apps_by_type[self.APP_TYPE_UNKNOWN]:
            apps_by_type[self.APP_TYPE_UNKNOWN].append(
                RMIDataChoice(self.UNKNOWN_SOURCE, _("Unknown Application"), {})
            )
        if self.as_dict:
            apps_by_type = self._map_chosen_by_choice_as_dict(apps_by_type)
        response = AppCaseRMIResponse(
            app_types=self._get_app_type_choices_for_cases(
                has_unknown_case_types=bool(case_types_by_app.get(self.UNKNOWN_SOURCE))
            ),
            apps_by_type=apps_by_type,
            case_types_by_app=case_types_by_app,
            placeholders=self.case_placeholders
        )
        if self.as_dict:
            response = response._asdict()
        return response
def get_case_rmi_response ( self ) : apps_by_type = self . _get_applications_by_type ( as_dict = False ) case_types_by_app = self . _get_cases_for_apps ( apps_by_type , self . as_dict ) # If there are Unknown case types, ensure that there exists an Unknown Application if case_types_by_app . get ( self . UNKNOWN_SOURCE ) and not apps_by_type [ self . APP_TYPE_UNKNOWN ] : apps_by_type [ self . APP_TYPE_UNKNOWN ] . append ( RMIDataChoice ( self . UNKNOWN_SOURCE , _ ( "Unknown Application" ) , { } ) ) if self . as_dict : apps_by_type = self . _map_chosen_by_choice_as_dict ( apps_by_type ) response = AppCaseRMIResponse ( app_types = self . _get_app_type_choices_for_cases ( has_unknown_case_types = bool ( case_types_by_app . get ( self . UNKNOWN_SOURCE ) ) ) , apps_by_type = apps_by_type , case_types_by_app = case_types_by_app , placeholders = self . case_placeholders ) if self . as_dict : response = response . _asdict ( ) return response