diff --git a/oarepo_model_builder/invenio/templates/invenio_record_search_options.py.jinja2 b/oarepo_model_builder/invenio/templates/invenio_record_search_options.py.jinja2 index 0df18782..909cb5d0 100644 --- a/oarepo_model_builder/invenio/templates/invenio_record_search_options.py.jinja2 +++ b/oarepo_model_builder/invenio/templates/invenio_record_search_options.py.jinja2 @@ -15,7 +15,7 @@ class {{ vars.search_options| class_header }}: {% endfor %} {% for base_class in vars.search_options.base_classes %} - **getattr(({{ base_class|base_name }}, 'facet_groups', {}).get('{{group }}', {})) + **getattr({{ base_class|base_name }}, 'facet_groups', {}).get('{{group }}', {}) {% endfor %} }, {% endfor %} diff --git a/setup.cfg b/setup.cfg index 9dee389b..d067b096 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = oarepo-model-builder -version = 4.0.56 +version = 4.0.57 description = A utility library that generates OARepo required data model files from a JSON specification file authors = Miroslav Bauer , Miroslav Simek readme = README.md diff --git a/tests/test_search_options.py b/tests/test_search_options.py index 7676c274..30a18da8 100644 --- a/tests/test_search_options.py +++ b/tests/test_search_options.py @@ -69,7 +69,7 @@ class TestSearchOptions(InvenioSearchOptions): - **getattr((InvenioSearchOptions, 'facet_groups', {}).get('curator', {})) + **getattr(InvenioSearchOptions, 'facet_groups', {}).get('curator', {}) }, @@ -364,11 +364,11 @@ class TestSearchOptions(BaseSearchOptions): 'curator': { 'a' : facets.a, 'g' : facets.g, - **getattr((BaseSearchOptions, 'facet_groups', {}).get('curator', {})) + **getattr(BaseSearchOptions, 'facet_groups', {}).get('curator', {}) }, 'user': { 'a' : facets.a, - **getattr((BaseSearchOptions, 'facet_groups', {}).get('user', {})) + **getattr(BaseSearchOptions, 'facet_groups', {}).get('user', {}) }, }