Skip to content

Commit

Permalink
switch cases for pid and non-pid
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Apr 18, 2024
1 parent 06d2d6b commit 5cd988d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pyDataverse/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,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 5cd988d

Please sign in to comment.