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

bugfix: get_session() contextmgr usage in consume_signals() #4888

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

wssheldon
Copy link
Contributor

Resolves:

AttributeError-'_GeneratorContextManager' object has no attribute 'query'

on

    install_plugins()
    db_session = get_session()
    organizations = get_all_organizations(db_session=db_session)

---> 

def get_all(*, db_session) -> List[Optional[Organization]]:
    """Gets all organizations."""
    return db_session.query(Organization)   <---

@wssheldon wssheldon added the bug Something isn't working label Jun 27, 2024
@wssheldon wssheldon requested a review from kevgliss June 27, 2024 00:57
@wssheldon wssheldon merged commit ef654e9 into master Jun 27, 2024
8 checks passed
@wssheldon wssheldon deleted the bugfix/session-context-consume branch June 27, 2024 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants