Skip to content

Commit c3b5371

Browse files
committed
Need to add session ID
1 parent 8142442 commit c3b5371

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/murfey/server/api/instrument.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ class RSyncerInfo(BaseModel):
420420
files_transferred: int
421421
files_counted: int
422422
transferring: bool
423+
session_id: int
423424

424425

425426
@router.get("/instruments/{instrument_name}/sessions/{session_id}/rsyncer_info")
@@ -443,7 +444,7 @@ async def get_rsyncer_info(
443444
) as resp:
444445
data = await resp.json()
445446
combined_data = []
446-
data_source_lookup = {d.source: d for d in data}
447+
data_source_lookup = {d["source"]: d for d in data}
447448
for ri in rsync_instances:
448449
d = data_source_lookup.get(ri.source, {})
449450
combined_data.append(
@@ -458,6 +459,7 @@ async def get_rsyncer_info(
458459
files_transferred=ri.files_transferred,
459460
files_counted=ri.files_counted,
460461
transferring=ri.transferring,
462+
session_id=session_id,
461463
)
462464
)
463465
return combined_data

0 commit comments

Comments
 (0)