Skip to content

Commit

Permalink
Remove overzealous cache usage for entry and spec names
Browse files Browse the repository at this point in the history
  • Loading branch information
bennybp committed Apr 11, 2024
1 parent 099684f commit bae24bf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions qcportal/qcportal/dataset_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit bae24bf

Please sign in to comment.