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

bug: get domain via id #149

Closed
wants to merge 1 commit into from
Closed
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: 2 additions & 2 deletions invenio_users_resources/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ class DomainAggregate(BaseAggregate):

@classmethod
def get_record(cls, id_):
"""Get the user via the specified ID."""
"""Get the domain via the specified ID."""
with db.session.no_autoflush:
domain = current_datastore.find_domain(id_)
domain = current_datastore.find_domain_by_id(id_)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
domain = current_datastore.find_domain_by_id(id_)
domain = current_datastore.find_domain(id_)

minor: see inveniosoftware/invenio-accounts#500 (comment), which would mean no need to change anything here.

if domain is None:
raise NoResultFound()
return cls.from_model(domain)
Expand Down
Loading