Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Context
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos SANCHEZ (contractor) authored and Carlos SANCHEZ (contractor) committed Dec 13, 2017
1 parent 06a13e0 commit 729d4c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions biredirect/redirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ def redirect_to_box():
return 'a'

try:
if g.get('boxclient', None) is None:
g.boxclient = BoxSync(BoxKeysStoreRedis, box_auth)
new_url = g.boxclient .get_download_url(doc_id)
boxclient = getattr(g, 'boxclient', None)
if boxclient is None:
boxclient = g.boxclient = BoxSync(BoxKeysStoreRedis, box_auth)
new_url = g.boxclient.get_download_url(doc_id)
return redirect(new_url)
except BoxOAuthException:
abort(503)
Expand Down

0 comments on commit 729d4c0

Please sign in to comment.