From 02798bdbe6e58d06bcfce851ead9396bd17799a9 Mon Sep 17 00:00:00 2001 From: brimoor Date: Sat, 7 Sep 2024 10:01:16 -0500 Subject: [PATCH] tweak --- fiftyone/core/materialize.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fiftyone/core/materialize.py b/fiftyone/core/materialize.py index df52269bab..d6d2e34106 100644 --- a/fiftyone/core/materialize.py +++ b/fiftyone/core/materialize.py @@ -289,7 +289,7 @@ def _sync_source(self, fields=None, ids=None, update=True, delete=False): if update: self._sync_source_schema(fields=fields) - if fields is None or sample_fields is not None: + if fields is None or sample_fields: pipeline = [] if ids is not None: @@ -319,9 +319,7 @@ def _sync_source(self, fields=None, ids=None, update=True, delete=False): self._materialized_dataset._aggregate(pipeline=pipeline) - if has_frame_fields and ( - fields is None or frame_fields is not None - ): + if has_frame_fields and (fields is None or frame_fields): pipeline = [] post_pipeline = []