From e228e2798301cf02e5a5ca60ae01dbfafd004706 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 1 Nov 2023 18:05:39 +0530 Subject: [PATCH] skip raising Exception on bump version if no staged changes make signup and admin email fields Optional --- packages/syft/src/syft/protocol/data_protocol.py | 5 +++-- packages/syft/src/syft/service/metadata/node_metadata.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/syft/src/syft/protocol/data_protocol.py b/packages/syft/src/syft/protocol/data_protocol.py index a17732a8a7c..6797c9e8866 100644 --- a/packages/syft/src/syft/protocol/data_protocol.py +++ b/packages/syft/src/syft/protocol/data_protocol.py @@ -271,8 +271,9 @@ def bump_protocol_version(self) -> Result[SyftSuccess, SyftError]: keys = self.protocol_history.keys() if "dev" not in keys: - raise Exception( - "You can't bump the protocol if there are no staged changes." + print("You can't bump the protocol if there are no staged changes.") + return SyftError( + message="Failed to bump version as there are no staged changes." ) highest_protocol = 0 diff --git a/packages/syft/src/syft/service/metadata/node_metadata.py b/packages/syft/src/syft/service/metadata/node_metadata.py index 05f61ba59e7..df8095d9b17 100644 --- a/packages/syft/src/syft/service/metadata/node_metadata.py +++ b/packages/syft/src/syft/service/metadata/node_metadata.py @@ -134,8 +134,8 @@ class NodeMetadataJSON(BaseModel, StorableObjectType): organization: str = "OpenMined" on_board: bool = False description: str = "My cool domain" - signup_enabled: bool - admin_email: str + signup_enabled: Optional[bool] + admin_email: Optional[str] node_side_type: str show_warnings: bool supported_protocols: List = []