Skip to content

Commit

Permalink
Merge pull request galaxyproject#16881 from jdavcs/dev_scalar_error
Browse files Browse the repository at this point in the history
Fix bug in SQLAlchemy statement
  • Loading branch information
jdavcs authored Oct 18, 2023
2 parents d8d27e8 + aba81f8 commit cd7661b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/managers/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,12 +652,12 @@ def get_shared_pages(session: Session, user: User):

def get_page(session: Session, user: User, slug: str):
stmt = _build_page_query(select(Page), user, slug)
return session.scalar(stmt).first()
return session.scalars(stmt).first()


def page_exists(session: Session, user: User, slug: str) -> bool:
stmt = _build_page_query(select(Page.id), user, slug)
return session.scalar(stmt).first() is not None
return session.scalars(stmt).first() is not None


def _build_page_query(select_clause, user: User, slug: str):
Expand Down

0 comments on commit cd7661b

Please sign in to comment.