diff --git a/tscat_gui/tscat_driver/actions.py b/tscat_gui/tscat_driver/actions.py index e0dc665..5eeb600 100644 --- a/tscat_gui/tscat_driver/actions.py +++ b/tscat_gui/tscat_driver/actions.py @@ -62,8 +62,10 @@ class GetCatalogueAction(Action): query_info: List[EventQueryInformation] = field(default_factory=list) def action(self) -> None: - catalogue = get_catalogues(UUID(self.uuid))[0] - self.events, self.query_info = get_events(catalogue, removed_items=self.removed_items) + catalogues = get_catalogues(UUID(self.uuid)) + if len(catalogues) == 0: + catalogues = get_catalogues(UUID(self.uuid), removed_items=True) + self.events, self.query_info = get_events(catalogues[0], removed_items=self.removed_items) @dataclass diff --git a/tscat_gui/tscat_driver/tscat_root_model.py b/tscat_gui/tscat_driver/tscat_root_model.py index 8e3327c..33ee9d2 100644 --- a/tscat_gui/tscat_driver/tscat_root_model.py +++ b/tscat_gui/tscat_driver/tscat_root_model.py @@ -1,4 +1,5 @@ import datetime as dt +import itertools import os import pickle import tempfile @@ -144,7 +145,7 @@ def _driver_action_done(self, action: Action) -> None: def catalog(self, uuid: str) -> CatalogModel: if uuid not in self._catalogues: - for child in self._root.children: + for child in itertools.chain(self._root.children, self._trash.children): if uuid == child.uuid: break else: