From: Art Rhyno Date: Fri, 11 Jan 2013 00:57:38 +0000 (-0500) Subject: Fix bug in Z39.50 searching X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fe789e64232653b7a9409e788e8941d1c232d93c;p=syrup%2Fmasslnc.git Fix bug in Z39.50 searching If a site had not defined EVERGREEN_OPAC_URL in settings, the Z39.50 search was tripping on it. Thanks to shadowspar for catching it. Also updated the date for the new year. Signed-off-by: Art Rhyno --- diff --git a/conifer/integration/evergreen_site.py b/conifer/integration/evergreen_site.py index f0d8f4d..6f4b3a3 100644 --- a/conifer/integration/evergreen_site.py +++ b/conifer/integration/evergreen_site.py @@ -19,7 +19,7 @@ try: OSRF_LIB_INSTALLED = True except ImportError: OSRF_LIB_INSTALLED = False - + if OSRF_LIB_INSTALLED: from conifer.libsystems.evergreen.startup import ils_startup @@ -481,14 +481,13 @@ class EvergreenIntegration(object): # TODO: move this to local_settings LIBCODE = 'OWA' if hasattr(settings, 'EVERGREEN_LIBCODE'): - LIBCODE = settings.EVERGREEN_OPAC_URL + # LIBCODE = settings.EVERGREEN_OPAC_URL + LIBCODE = self.OPAC_URL try: dct = M.marcxml_to_dictionary(marc_string) words = lambda string: re.findall(r'\S+', string) keys = words(dct.get('8569')) urls = words(dct.get('856u')) - print 'KEYS:', keys - print 'URLS:', urls return urls[keys.index(LIBCODE)] except: return None diff --git a/conifer/templates/master.xhtml b/conifer/templates/master.xhtml index ce833dc..d65c74c 100644 --- a/conifer/templates/master.xhtml +++ b/conifer/templates/master.xhtml @@ -72,7 +72,7 @@ from django.conf import settings