Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and omad committed Nov 18, 2022
1 parent 3ff213a commit a900717
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cubedash/_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,14 @@ def _dataset_created(dataset: Dataset):
def _dataset_file_paths(dataset: Dataset):
return utils.get_dataset_file_offsets(dataset)


@bp.app_template_filter("dataset_thumbnail_url")
def _dataset_thumbnail_url(dataset: Dataset):
file_paths = _dataset_file_paths(dataset)
if "thumbnail:nbart" in file_paths:
offset = file_paths['thumbnail:nbart']
offset = file_paths["thumbnail:nbart"]
elif "thumbnail" in file_paths:
offset = file_paths['thumbnail']
offset = file_paths["thumbnail"]
else:
return ""
return _to_remote_url(offset, dataset.uris[0])
Expand Down

0 comments on commit a900717

Please sign in to comment.