Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadnaseri committed Sep 10, 2024
1 parent 0f2e7df commit 29d19f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/py/flwr/server/superlink/state/sqlite_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def get_nodes(self, run_id: int) -> Set[int]:
sint64_run_id = uint64_to_sint64(run_id)

# Validate run ID
query = "SELECT COUNT(*) FROM run WHERE sint64_run_id = ?;"
query = "SELECT COUNT(*) FROM run WHERE run_id = ?;"
if self.query(query, (sint64_run_id,))[0]["COUNT(*)"] == 0:
return set()

Expand Down Expand Up @@ -673,12 +673,12 @@ def create_run(
sint64_run_id = uint64_to_sint64(run_id)

# Check conflicts
query = "SELECT COUNT(*) FROM run WHERE sint64_run_id = ?;"
query = "SELECT COUNT(*) FROM run WHERE run_id = ?;"
# If sint64_run_id does not exist
if self.query(query, (sint64_run_id,))[0]["COUNT(*)"] == 0:
query = (
"INSERT INTO run "
"(sint64_run_id, fab_id, fab_version, fab_hash, override_config)"
"(run_id, fab_id, fab_version, fab_hash, override_config)"
"VALUES (?, ?, ?, ?, ?);"
)
if fab_hash:
Expand Down

0 comments on commit 29d19f2

Please sign in to comment.