From fb28ae9d5d4de72586bfcb997e34042ea1e5d7f0 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Fri, 1 Dec 2023 16:48:22 +0530 Subject: [PATCH] fix Twin mock object being marked as empty post code execution Co-authored-by: Peter Chung --- packages/syft/src/syft/service/code/user_code_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/syft/src/syft/service/code/user_code_service.py b/packages/syft/src/syft/service/code/user_code_service.py index e4a9eba500b..98ab497005d 100644 --- a/packages/syft/src/syft/service/code/user_code_service.py +++ b/packages/syft/src/syft/service/code/user_code_service.py @@ -271,6 +271,8 @@ def call( if isinstance(result, TwinObject): return result.mock + elif result.is_mock: + return result else: return result.as_empty() except Exception as e: