Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Jul 11, 2024
1 parent e4bcada commit f753125
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fedn/network/storage/statestore/mongostatestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ def set_client(self, client_data):
self.clients.update_one({"client_id": client_data["client_id"]}, {"$set": client_data}, True)
except KeyError:
# If client_id is not present, use name as identifier, for backwards compatibility
id = str(uuid.uuid4())
client_data["client_id"] = id
self.clients.update_one({"name": client_data["name"]}, {"$set": client_data}, True)

def get_client(self, client_id):
Expand Down

0 comments on commit f753125

Please sign in to comment.