Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix domain #505

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion invenio_accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
from .ext import InvenioAccounts, InvenioAccountsREST, InvenioAccountsUI
from .proxies import current_accounts

__version__ = "5.1.6"
__version__ = "5.1.5"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, this should be 5.1.7


__all__ = (
"__version__",
Expand Down
3 changes: 3 additions & 0 deletions invenio_accounts/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down