From 9ef53862bd992ecdfee5ffcfece0a2d60f5376a8 Mon Sep 17 00:00:00 2001 From: teo Date: Tue, 8 Oct 2024 16:40:20 +0300 Subject: [PATCH] fix tests --- packages/syft/src/syft/service/sync/diff_state.py | 4 +++- packages/syft/src/syft/service/sync/sync_service.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/syft/src/syft/service/sync/diff_state.py b/packages/syft/src/syft/service/sync/diff_state.py index cb6edd43086..1078dab3b42 100644 --- a/packages/syft/src/syft/service/sync/diff_state.py +++ b/packages/syft/src/syft/service/sync/diff_state.py @@ -1602,7 +1602,9 @@ def from_batch_decision( ) ] } - if diff.obj_type in [Job, SyftLog, ActionObject, Request]: + if diff.obj_type in [Job, SyftLog, Request] or issubclass( + diff.obj_type, ActionObject + ): new_permissions_high_side = { diff.obj_type: [ ActionObjectPermission( diff --git a/packages/syft/src/syft/service/sync/sync_service.py b/packages/syft/src/syft/service/sync/sync_service.py index d2d86302ea6..19bed044eb4 100644 --- a/packages/syft/src/syft/service/sync/sync_service.py +++ b/packages/syft/src/syft/service/sync/sync_service.py @@ -210,7 +210,9 @@ def sync_items( for permission in permission_list: if permission.uid in item_ids: continue - if obj_type not in [Job, SyftLog, ActionObject, Request]: + if obj_type not in [Job, SyftLog, Request] and not issubclass( + obj_type, ActionObject + ): raise SyftException( public_message="Permission for object type not supported!" )