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 = []