Skip to content

Commit

Permalink
Re-organizing fetch_entries set.
Browse files Browse the repository at this point in the history
  • Loading branch information
test committed Dec 10, 2024
1 parent 16909e5 commit 1911930
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions qcportal/qcportal/dataset_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,11 +811,13 @@ def modify_entries(
)

# Sync local cache with updated server.
self.fetch_entries(
list((attribute_map.keys() if (attribute_map is not None) else set())
| (comment_map.keys() if (comment_map is not None) else set())),
force_refetch=True,
)
entries_to_sync = set()
if attribute_map is not None:
entries_to_sync = entries_to_sync | attribute_map.keys()
if comment_map is not None:
entries_to_sync = entries_to_sync | comment_map.keys()

self.fetch_entries(entries_to_sync, force_refetch=True)

def delete_entries(self, names: Union[str, Iterable[str]], delete_records: bool = False) -> DeleteMetadata:
self.assert_is_not_view()
Expand Down

0 comments on commit 1911930

Please sign in to comment.