Skip to content

Commit 91d5ef7

Browse files
JakobMiesnerntarocco
authored andcommitted
Closures: fail early if config is missing by not using "get"
Co-authored-by: Nicola <[email protected]>
1 parent 6d7a783 commit 91d5ef7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

invenio_app_ils/closures/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
def create_closures_blueprint(app):
2424
"""Create location closed periods blueprint."""
2525
blueprint = Blueprint("invenio_app_ils_closures", __name__, url_prefix="")
26-
endpoints = app.config.get("RECORDS_REST_ENDPOINTS", [])
26+
endpoints = app.config["RECORDS_REST_ENDPOINTS"]
2727

2828
options = endpoints[LOCATION_PID_TYPE]
2929
default_media_type = options.get("default_media_type", "")

0 commit comments

Comments
 (0)