Skip to content

Commit

Permalink
Merge pull request #5122 from voxel51/bug-clear-fields
Browse files Browse the repository at this point in the history
Fix target view for clear sample/frame field operators
  • Loading branch information
brimoor authored Nov 15, 2024
2 parents 02ae185 + 6ff3d05 commit f9770af
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fiftyone/operators/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,11 @@ def resolve_input(self, ctx):

def execute(self, ctx):
field_name = ctx.params["field_name"]
target = ctx.params.get("target", None)

target_view = _get_target_view(ctx, target)

ctx.dataset.clear_sample_field(field_name)
target_view.clear_sample_field(field_name)
ctx.trigger("reload_dataset")


Expand Down Expand Up @@ -713,8 +716,11 @@ def resolve_input(self, ctx):

def execute(self, ctx):
field_name = ctx.params["field_name"]
target = ctx.params.get("target", None)

target_view = _get_target_view(ctx, target)

ctx.dataset.clear_frame_field(field_name)
target_view.clear_frame_field(field_name)
ctx.trigger("reload_dataset")


Expand Down

0 comments on commit f9770af

Please sign in to comment.