From bae24bf949107654fc842c1d2fc961e5a325df4e Mon Sep 17 00:00:00 2001 From: Benjamin Pritchard Date: Thu, 11 Apr 2024 11:43:14 -0400 Subject: [PATCH] Remove overzealous cache usage for entry and spec names --- qcportal/qcportal/dataset_models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qcportal/qcportal/dataset_models.py b/qcportal/qcportal/dataset_models.py index 36b7dc096..1432f9de4 100644 --- a/qcportal/qcportal/dataset_models.py +++ b/qcportal/qcportal/dataset_models.py @@ -525,10 +525,10 @@ def fetch_specifications( @property def specification_names(self) -> List[str]: if not self._specification_names: - self._specification_names = self._cache_data.get_specification_names() - - if not self._specification_names and not self.is_view: - self.fetch_specification_names() + if self.is_view: + self._specification_names = self._cache_data.get_specification_names() + else: + self.fetch_specification_names() return self._specification_names @@ -769,10 +769,10 @@ def iterate_entries( @property def entry_names(self) -> List[str]: if not self._entry_names: - self._entry_names = self._cache_data.get_entry_names() - - if not self._entry_names and not self.is_view: - self.fetch_entry_names() + if self.is_view: + self._entry_names = self._cache_data.get_entry_names() + else: + self.fetch_entry_names() return self._entry_names