diff --git a/fedn/network/combiner/combiner.py b/fedn/network/combiner/combiner.py index 7f7b93548..2c59991f9 100644 --- a/fedn/network/combiner/combiner.py +++ b/fedn/network/combiner/combiner.py @@ -127,7 +127,10 @@ def __init__(self, config): # Set the status to offline for previous clients. previous_clients = self.statestore.clients.find({"combiner": config["name"]}) for client in previous_clients: - self.statestore.set_client({"name": client["name"], "status": "offline", "client_id": client["client_id"]}) + try: + self.statestore.set_client({"name": client["name"], "status": "offline", "client_id": client["client_id"]}) + except KeyError: + self.statestore.set_client({"name": client["name"], "status": "offline"}) self.modelservice = ModelService()