Skip to content

Commit

Permalink
Prevent EnclaveInstance from contacting enclave when not creating.
Browse files Browse the repository at this point in the history
  • Loading branch information
itstauq committed Jun 26, 2024
1 parent 33710e8 commit 5ecb02d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/syft/src/syft/service/enclave/enclave.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class EnclaveInstance(SyftObject):
@model_validator(mode="before")
@classmethod
def initialize_values(cls, values: dict[str, Any]) -> dict[str, Any]:
if "route" in values:
is_being_created = "id" not in values

if is_being_created and "route" in values:
connection = route_to_connection(values["route"])
metadata = connection.get_node_metadata(credentials=None)
if not metadata:
Expand Down

0 comments on commit 5ecb02d

Please sign in to comment.