Skip to content

Commit

Permalink
check if view is group before assigning slice (#4066)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashankaryal authored Feb 6, 2024
1 parent 757fa81 commit bd817b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fiftyone/server/routes/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import fiftyone.core.view as fov

from fiftyone.server.decorators import route
import fiftyone.core.media as fom
import fiftyone.server.view as fosv


Expand All @@ -33,7 +34,7 @@ async def post(self, request: Request, data: dict):
view = fosv.get_view(dataset, stages=stages, extended_stages=extended)
view = fov.make_optimized_select_view(view, sample_id)

if group_slice is not None:
if view.media_type == fom.GROUP and group_slice is not None:
view.group_slice = group_slice

end_frame = min(num_frames + start_frame, frame_count)
Expand Down

0 comments on commit bd817b8

Please sign in to comment.