Skip to content

Commit

Permalink
Merge pull request #4904 from matthewturk/sanitize_fields
Browse files Browse the repository at this point in the history
Move field resolution inside conditional.
  • Loading branch information
chrishavlin committed May 15, 2024
2 parents bdef0b6 + 8cc6597 commit 2880d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt/data_objects/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2880d15

Please sign in to comment.