def _get_reg_list_config(regform): session_key = "reglist_config_{}".format(regform.id) report_config_uuid = request.args.get("config") if report_config_uuid: configuration = ReportLink.load(regform.event_new, REPORT_LINK_TYPE, report_config_uuid) if configuration and configuration["regform_id"] == regform.id: session[session_key] = configuration["data"] return session.get(session_key, DEFAULT_REPORT_CONFIG)
def _get_reg_list_config(regform): session_key = 'reglist_config_{}'.format(regform.id) report_config_uuid = request.args.get('config') if report_config_uuid: configuration = ReportLink.load(regform.event_new, REPORT_LINK_TYPE, report_config_uuid) if configuration and configuration['regform_id'] == regform.id: session[session_key] = configuration['data'] return session.get(session_key, DEFAULT_REPORT_CONFIG)
def _get_config(self): """Load the report's configuration from the DB and return it.""" session_key = self._get_config_session_key() if self.static_link_used: uuid = request.args['config'] configuration = ReportLink.load(self.report_event, self.report_link_type, uuid) if configuration and configuration['entry_parent_id'] == self.entry_parent.id: session[session_key] = configuration['data'] return session.get(session_key, self.default_report_config)
def _get_config(self): """Load the report's configuration from the DB and return it.""" session_key = self._get_config_session_key() if self.static_link_used: uuid = request.args['config'] configuration = ReportLink.load(self.report_event, self.report_link_type, uuid) if configuration and configuration[ 'entry_parent_id'] == self.entry_parent.id: session[session_key] = configuration['data'] return session.get(session_key, self.default_report_config)