Skip to content

Commit

Permalink
Caesar connect respect connection env (#307)
Browse files Browse the repository at this point in the history
* update caesar.py to respect panoptes connected endpoints when connecting to panoptes first

* update caesar.py so that it does not use _local of Panoptes
  • Loading branch information
yuenmichelle1 committed Apr 16, 2024
1 parent d23d2b7 commit 09ffe42
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion panoptes_client/caesar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ class Caesar(object):

def __init__(
self,
endpoint='https://caesar.zooniverse.org',
endpoint=None,
redirect_url='https://caesar.zooniverse.org/auth/zooniverse/callback'
):
_default_endpoint = 'https://caesar.zooniverse.org'
if Panoptes.client().endpoint == 'https://panoptes-staging.zooniverse.org':
_default_endpoint = 'https://caesar-staging.zooniverse.org'

if endpoint is None:
endpoint = _default_endpoint

self.endpoint = endpoint
self.headers = {
'Accept': 'application/json'
Expand Down

0 comments on commit 09ffe42

Please sign in to comment.