(self, filter_results)
Returns the appropriate form information based on the current filter selection.
Returns the appropriate form information based on the current filter selection.
Returns the appropriate form information based on the current filter selection .
def _get_selected_forms(self, filter_results):
        """
        Returns the appropriate form information based on the current filter selection.
        """
        if self._show_unknown:
            return self._get_selected_forms_for_unknown_apps()
        else:
            result = {}
            data = self._get_filtered_data(filter_results)
            for form_details in data:
                xmlns_app = self.make_xmlns_app_key(form_details.xmlns, form_details.app.id)
                if xmlns_app not in result:
                    result[xmlns_app] = self._generate_report_app_info(
                        form_details.xmlns,
                        form_details.app.id,
                        self._formatted_name_from_app(self.display_lang, form_details),
                    )

            if not self._hide_fuzzy_results and self._fuzzy_forms:
                selected_xmlns = [r['xmlns'] for r in result.values()]
                selected_apps = [r['app_id'] for r in result.values()]
                for xmlns, info in self._fuzzy_form_data.items():
                    for form_details in info['apps']:
                        if xmlns in selected_xmlns and form_details.app.id in selected_apps:
                            result["%s %s" % (xmlns, self.fuzzy_slug)] = self._generate_report_app_info(
                                xmlns,
                                info['unknown_id'],
                                "%s [Fuzzy Submissions]" % self._formatted_name_from_app(
                                    self.display_lang, form_details),
                                is_fuzzy=True,
                            )
            return result
def _get_selected_forms ( self , filter_results ) : if self . _show_unknown : return self . _get_selected_forms_for_unknown_apps ( ) else : result = { } data = self . _get_filtered_data ( filter_results ) for form_details in data : xmlns_app = self . make_xmlns_app_key ( form_details . xmlns , form_details . app . id ) if xmlns_app not in result : result [ xmlns_app ] = self . _generate_report_app_info ( form_details . xmlns , form_details . app . id , self . _formatted_name_from_app ( self . display_lang , form_details ) , ) if not self . _hide_fuzzy_results and self . _fuzzy_forms : selected_xmlns = [ r [ 'xmlns' ] for r in result . values ( ) ] selected_apps = [ r [ 'app_id' ] for r in result . values ( ) ] for xmlns , info in self . _fuzzy_form_data . items ( ) : for form_details in info [ 'apps' ] : if xmlns in selected_xmlns and form_details . app . id in selected_apps : result [ "%s %s" % ( xmlns , self . fuzzy_slug ) ] = self . _generate_report_app_info ( xmlns , info [ 'unknown_id' ] , "%s [Fuzzy Submissions]" % self . _formatted_name_from_app ( self . display_lang , form_details ) , is_fuzzy = True , ) return result