This pull request fixes the get_datafile endpoint and allows redirects upon requests, which is happening in the case of data access. Before this PR, the get_datafile method used the persistent ID access URL if pid=False and vice versa. This has been fixed by simply switching the if statements. In addition, tests have been added to pyDataverse to check if data access is working.
TLDR
Fixed get_datafile method of DataAccessApi due to wrong conditions
Redirects are now followed if a request encounters one
Overview
This pull request fixes the
get_datafile
endpoint and allows redirects upon requests, which is happening in the case of data access. Before this PR, theget_datafile
method used the persistent ID access URL ifpid=False
and vice versa. This has been fixed by simply switching theif
statements. In addition, tests have been added to pyDataverse to check if data access is working.TLDR
get_datafile
method ofDataAccessApi
due to wrong conditionsget_datafile
(pid and id case)