Browse Source

Conserta bugs em verb Identify

pull/2582/head
Edward Ribeiro 6 years ago
parent
commit
05785958fe
  1. 4
      sapl/lexml/OAIServer.py
  2. 3
      sapl/lexml/views.py

4
sapl/lexml/OAIServer.py

@ -54,7 +54,7 @@ class OAIServer:
granularity='YYYY-MM-DDThh:mm:ssZ',
compression=['identity'],
toolkit_description=False)
if not self.config['descricao']:
if self.config['descricao']:
result.add_description(self.config['descricao'])
return result
@ -263,7 +263,7 @@ def get_config(url, batch_size):
'base_asset_path': None,
'metadata_prefixes': ['oai_lexml']}
config.update({'titulo': casa_legislativa().nome, # Inicializa variável global casa
'email': casa.email,
'email': [casa.email], # lista de e-mails
'base_url': url[:url.find('/', 8)],
'descricao': casa.informacao_geral,
'batch_size': batch_size})

3
sapl/lexml/views.py

@ -12,7 +12,6 @@ LexmlPublicadorCrud = CrudAux.build(LexmlPublicador, 'lexml_publicador')
def lexml_request(request):
config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', 10)))
oai_server = OAIServerFactory(config)
r = oai_server.handleRequest({'verb': request.GET.get('verb', 'ListRecords'),
'metadataPrefix': request.GET.get('metadataPrefix', 'oai_lexml')})
r = oai_server.handleRequest(request.GET)
response = r.decode('UTF-8')
return HttpResponse(response, content_type='text/xml')

Loading…
Cancel
Save