Skip to content

Patch for Flask 3.0.x #37

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions flask_githubapp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import hmac
import logging

from flask import abort, current_app, jsonify, make_response, request, _app_ctx_stack
from flask import abort, current_app, jsonify, make_response, request, g
from github3 import GitHub, GitHubEnterprise
from werkzeug.exceptions import BadRequest

Expand Down Expand Up @@ -115,7 +115,7 @@ def payload(self):
@property
def installation_client(self):
"""GitHub client authenticated as GitHub app installation"""
ctx = _app_ctx_stack.top
ctx = g
if ctx is not None:
if not hasattr(ctx, 'githubapp_installation'):
client = self.client
Expand All @@ -128,7 +128,7 @@ def installation_client(self):
@property
def app_client(self):
"""GitHub client authenticated as GitHub app"""
ctx = _app_ctx_stack.top
ctx = g
if ctx is not None:
if not hasattr(ctx, 'githubapp_app'):
client = self.client
Expand Down