Skip to content

Commit

Permalink
Merge pull request galaxyproject#18547 from mvdbeek/fix_displayable_d…
Browse files Browse the repository at this point in the history
…eleted_request

[24.1] Also check dataset.deleted when determining if data can be displayed
  • Loading branch information
mvdbeek authored Jul 17, 2024
2 parents 13871de + 52b868e commit d184979
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/galaxy/datatypes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def set_meta(
def displayable(self, dataset: DatasetProtocol) -> bool:
try:
return (
not dataset.dataset.purged
not dataset.deleted
and not dataset.dataset.purged
and dataset.has_data()
and dataset.state == dataset.states.OK
and dataset.metadata.columns > 0
Expand Down
5 changes: 5 additions & 0 deletions lib/galaxy/datatypes/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class HasCreatingJob(Protocol):
def creating_job(self): ...


class HasDeleted(Protocol):
deleted: bool


class HasExt(Protocol):
@property
def ext(self): ...
Expand Down Expand Up @@ -55,6 +59,7 @@ class HasExtraFilesAndMetadata(HasExtraFilesPath, HasMetadata, Protocol): ...

class DatasetProtocol(
HasCreatingJob,
HasDeleted,
HasExt,
HasExtraFilesPath,
HasFileName,
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/datatypes/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def set_peek(self, dataset: DatasetProtocol, **kwd) -> None:
def displayable(self, dataset: DatasetProtocol) -> bool:
try:
return (
not dataset.dataset.purged
not dataset.deleted
and not dataset.dataset.purged
and dataset.has_data()
and dataset.state == dataset.states.OK
and dataset.metadata.columns > 0
Expand Down

0 comments on commit d184979

Please sign in to comment.