Skip to content

Commit

Permalink
fixed integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
xrotwang committed Nov 27, 2023
1 parent 91cb4de commit dd0ce92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cldfzenodo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ def gh(args):
lambda m: ',\n {} = '.format(m.group('field')),
bib), _check_id=False)
bib.id = bibid or repos.replace('/', '_')
del bib['abstractNote']
del bib['month']
for field in ['abstractNote', 'month']:
if field in bib:
del bib[field]
bib['edition'] = tag
bib['type'] = 'Data set'
return tag, doi, cit, bib
Expand Down
2 changes: 2 additions & 0 deletions src/cldfzenodo/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def download(self, dest, log=None, unwrap=True, prefer_github=True) -> pathlib.P
self._download(self.github_repos.release_url, dest, log=log)
else:
for url in self.download_urls:
if url.endswith('/content'):
url = url[:-len('/content')] # pragma: no cover
self._download(url, dest, log=log)
inner = list(dest.iterdir())
if unwrap and is_empty and len(inner) == 1 and inner[0].is_dir():
Expand Down

0 comments on commit dd0ce92

Please sign in to comment.