Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Apr 24, 2024
1 parent c6252cc commit ba4bf75
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pyDataverse/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _sync_request(
kwargs = self._filter_kwargs(kwargs)

try:
resp = method(**kwargs)
resp = method(**kwargs, follow_redirects=True)

if resp.status_code == 401:
error_msg = resp.json()["message"]
Expand Down Expand Up @@ -462,13 +462,13 @@ def get_datafile(
"""
is_first_param = True
if is_pid:
url = "{0}/datafile/{1}".format(self.base_url_api_data_access, identifier)
if data_format or no_var_header or image_thumb:
url += "?"
else:
url = "{0}/datafile/:persistentId/?persistentId={1}".format(
self.base_url_api_data_access, identifier
)
else:
url = "{0}/datafile/{1}".format(self.base_url_api_data_access, identifier)
if data_format or no_var_header or image_thumb:
url += "?"
if data_format:
url += "format={0}".format(data_format)
is_first_param = False
Expand Down

0 comments on commit ba4bf75

Please sign in to comment.