From 8cc65978298f3fa29fd2a1cf4b464c087680f921 Mon Sep 17 00:00:00 2001 From: Matthew Turk Date: Wed, 15 May 2024 13:45:42 -0500 Subject: [PATCH] Move field resolution inside conditional. --- yt/data_objects/data_containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt/data_objects/data_containers.py b/yt/data_objects/data_containers.py index 26763d59722..83f4ff7594a 100644 --- a/yt/data_objects/data_containers.py +++ b/yt/data_objects/data_containers.py @@ -33,8 +33,8 @@ def sanitize_weight_field(ds, field, weight): - field_object = ds._get_field_info(field) if weight is None: + field_object = ds._get_field_info(field) if field_object.sampling_type == "particle": if field_object.name[0] == "gas": ptype = ds._sph_ptypes[0]