diff --git a/sapl/lexml/OAIServer.py b/sapl/lexml/OAIServer.py index c02eb3ae3..ad4264dc5 100644 --- a/sapl/lexml/OAIServer.py +++ b/sapl/lexml/OAIServer.py @@ -267,16 +267,18 @@ def get_xml_provedor(): descricao = descricao.encode('utf-8') return descricao + def get_config(url, batch_size): config = {'content_type': None, 'delay': 0, 'base_asset_path': None, - 'metadata_prefixes': ['oai_lexml']} - config.update({'titulo': casa_legislativa().nome, # Inicializa variável global casa - 'email': [casa.email], # lista de e-mails - 'base_url': url[:url.find('/', 8)], - 'descricao': get_xml_provedor(), - 'batch_size': batch_size}) + 'metadata_prefixes': ['oai_lexml'], + 'titulo': casa_legislativa().nome, # Inicializa variável global casa + 'email': [casa.email], # lista de e-mails, antigo `def get_email()` + 'base_url': url[:url.find('/', 8)], + 'descricao': get_xml_provedor(), + 'batch_size': batch_size + } return config diff --git a/sapl/lexml/views.py b/sapl/lexml/views.py index 07843c3e8..1e5187a2b 100644 --- a/sapl/lexml/views.py +++ b/sapl/lexml/views.py @@ -10,7 +10,7 @@ LexmlPublicadorCrud = CrudAux.build(LexmlPublicador, 'lexml_publicador') def lexml_request(request): - config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', 10))) + config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', '10'))) oai_server = OAIServerFactory(config) r = oai_server.handleRequest(request.GET) response = r.decode('UTF-8')