diff --git a/data/libraries.json b/data/libraries.json index 3d2a30b40b..a49272bea3 100644 --- a/data/libraries.json +++ b/data/libraries.json @@ -544,6 +544,58 @@ "name": "Biblioth\u00e8que cantonale", "organisation": { "$ref": "https://ils.rero.ch/api/organisations/3" - } + }, + "opening_hours": [ + { + "day": "monday", + "is_open": true, + "times": [ + { + "start_time": "07:00", + "end_time": "19:00" + } + ] + }, + { + "day": "tuesday", + "is_open": false, + "times": [] + }, + { + "day": "wednesday", + "is_open": false, + "times": [] + }, + { + "day": "thursday", + "is_open": true, + "times": [ + { + "start_time": "07:00", + "end_time": "19:00" + } + ] + }, + { + "day": "friday", + "is_open": false, + "times": [] + }, + { + "day": "saturday", + "is_open": false, + "times": [] + }, + { + "day": "sunday", + "is_open": true, + "times": [ + { + "start_time": "14:00", + "end_time": "18:00" + } + ] + } + ] } -] \ No newline at end of file +] diff --git a/rero_ils/config.py b/rero_ils/config.py index ff78fb48bb..359008ebf0 100644 --- a/rero_ils/config.py +++ b/rero_ils/config.py @@ -1031,7 +1031,7 @@ def _(x): RERO_ILS_APP_IMPORT_BNF_EAN = 'http://catalogue.bnf.fr/api/SRU?'\ 'version=1.2&operation=searchRetrieve'\ '&recordSchema=unimarcxchange&maximumRecords=1'\ - '&startRecord=1&query=bib.ean%%20all%%20"%s"' + '&startRecord=1&query=bib.ean all "{}"' RERO_ILS_APP_HELP_PAGE = ( 'https://github.com/rero/rero-ils/wiki/Public-demo-help' diff --git a/rero_ils/modules/apiharvester/utils.py b/rero_ils/modules/apiharvester/utils.py index d49ae24e33..eabd629516 100644 --- a/rero_ils/modules/apiharvester/utils.py +++ b/rero_ils/modules/apiharvester/utils.py @@ -123,9 +123,10 @@ def get_records(url=None, name=None, from_date=None, max=0, size=100, else: yield next, records next = data.get('links', {}).get('next', None) - except Exception as e: + except Exception as error: click.secho( - 'Harvesting API ConnectionRefusedError: {e}'.format(e=e), + 'Harvesting API ConnectionRefusedError: {error}'.format( + error=error), fg='red' ) return 0, url, [] diff --git a/rero_ils/modules/cli.py b/rero_ils/modules/cli.py index 7870ea4faf..33ee664806 100644 --- a/rero_ils/modules/cli.py +++ b/rero_ils/modules/cli.py @@ -151,10 +151,10 @@ def check_json(paths, replace, indent, sort_keys, verbose): else: click.echo(fname + ': ', nl=False) click.secho('Bad indentation', fg='red') - except ValueError as e: + except ValueError as error: click.echo(fname + ': ', nl=False) click.secho('Invalid JSON', fg='red', nl=False) - click.echo(' -- ' + e.msg) + click.echo(' -- ' + error.msg) error_cnt = 1 tot_error_cnt += error_cnt diff --git a/rero_ils/modules/documents/jsonschemas/documents/document-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document-v0.0.1.json index f4c880f69c..80110fbeda 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document-v0.0.1.json @@ -1340,4 +1340,4 @@ "default": false } } -} \ No newline at end of file +} diff --git a/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html b/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html index 97873c3658..964980e43a 100644 --- a/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html +++ b/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html @@ -265,7 +265,8 @@

{{ item.call_number }} {% endif %} - {% if item|can_request %} + {% set locations = item|item_library_pickup_locations %} + {% if item|can_request and locations %}