Skip to content

Commit 376a304

Browse files
committed
Persist probe element document in getprobes() to match MATLAB
Python's getprobes() was creating ndi_probe objects in memory but never calling database_add() for the element document. MATLAB's getprobes persists the probe element document to the database, producing 10 documents in ingestion sessions vs Python's 9. Added database_add(probe.newdocument()) after creating new probes, matching MATLAB behavior. Updated pythonArtifacts.tar.gz with the corrected artifacts (now 10 documents per ingestion session). https://claude.ai/code/session_01X3Dg23mnjFYU1fjJBrahjt
1 parent 9dc35ce commit 376a304

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

pythonArtifacts.tar.gz

2.02 KB
Binary file not shown.

src/ndi/session/session_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,9 @@ def getprobes(self, classmatch: str | None = None, **kwargs) -> list[Any]:
881881
type=ps.get("type", ""),
882882
subject_id=ps.get("subject_id", ""),
883883
)
884+
# Persist the element document to the database, matching
885+
# MATLAB's getprobes behavior (ndi_session_dir.m).
886+
self.database_add(probe.newdocument())
884887
probes.append(probe)
885888

886889
probes.extend(existing_probes)

0 commit comments

Comments
 (0)