Skip to content

Commit

Permalink
Merge pull request #1762 from dandi/implicit-return
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhelba committed Nov 29, 2023
2 parents a0f5652 + c676bcf commit 68d122a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions dandiapi/api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def queryset(self, request, queryset):
status = self.value()
if status:
return queryset.filter(status=status)
return None


@admin.register(Version)
Expand Down
2 changes: 2 additions & 0 deletions dandiapi/api/models/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def sha256(self):
return self.blob.sha256
elif self.is_embargoed_blob:
return self.embargoed_blob.sha256
else:
raise RuntimeError('Zarr does not support SHA256')

@property
def digest(self) -> dict[str, str]:
Expand Down
2 changes: 2 additions & 0 deletions dandiapi/api/views/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def download(self, request, *args, **kwargs):
)

return HttpResponseRedirect(url)
else:
raise TypeError('Invalid content_disposition: %s', content_disposition)

@swagger_auto_schema(
method='GET',
Expand Down

0 comments on commit 68d122a

Please sign in to comment.