Skip to content

Commit

Permalink
fix: find token cache specifically for admin [CU-37q6frk] (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alchez authored Dec 22, 2022
1 parent 3ea5aed commit 302c9de
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def validate(self):
self.update_webhooks()

def get_shopify_access_token(self):
from shopify_integration.oauth import DEFAULT_TOKEN_USER

if self.app_type not in ("Custom (OAuth)", "Public"):
return

Expand All @@ -60,7 +62,7 @@ def get_shopify_access_token(self):
)

token_cache: Optional["TokenCache"] = connected_app.get_token_cache(
frappe.session.user
DEFAULT_TOKEN_USER,
)

if token_cache:
Expand Down

0 comments on commit 302c9de

Please sign in to comment.