Skip to content
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