diff --git a/CHANGES.rst b/CHANGES.rst index 5770f251..e11eab6a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,10 @@ Changes ======= +Version v5.1.7 (released 2024-11-29) + +- datastore: Fix domain fetching on None value + Version v5.1.6 (released 2024-11-28) - setup: pin dependencies diff --git a/invenio_accounts/__init__.py b/invenio_accounts/__init__.py index aeb40513..3fb2c006 100644 --- a/invenio_accounts/__init__.py +++ b/invenio_accounts/__init__.py @@ -55,7 +55,7 @@ from .ext import InvenioAccounts, InvenioAccountsREST, InvenioAccountsUI from .proxies import current_accounts -__version__ = "5.1.6" +__version__ = "5.1.5" __all__ = ( "__version__", diff --git a/invenio_accounts/datastore.py b/invenio_accounts/datastore.py index 98808247..5f0c2fb7 100644 --- a/invenio_accounts/datastore.py +++ b/invenio_accounts/datastore.py @@ -113,6 +113,9 @@ def find_role_by_id(self, role_id): def find_domain(self, domain_or_id): """Find a domain by value or ID.""" + if domain_or_id is None: + return None + if isinstance(domain_or_id, str): if domain_or_id.isdigit(): clause = Domain.id == int(domain_or_id)