Repository navigation
[electrophysiology_browser] Fix extra event fields API serialization - #11211
Closed
MaximeBICMTL wants to merge 1 commit into
Closed
MaximeBICMTL wants to merge 1 commit into
MaximeBICMTL wants to merge 1 commit into
Conversation
MaximeBICMTL
marked this pull request as ready for review
September 18, 2026 10:17
MaximeBICMTL
force-pushed
the
fix-ephys-browser-extra-events-serialization
branch
from
September 24, 2026 09:20
67785fa to
f14cbcb
Compare
Contributor
Author
|
Closed in favor of #11003. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the electrophysiolgy browser event extra columns serialization by adding missing
iterator_to_arrayaround SQL query, ensuring the module API always returns an array whether or not the query is populated. The current code returns an empty object rather than an empty array when there is no extra column.Testing
Raisinbread URL: http://loris.local/electrophysiology_browser/sessions/167?outputType=all_types
(opening this URL straight in your browser will give you HTML, but go to the network inspector to see the same request in JSON mode, which highlights the fix).
Before fix
{ "patient": { "pscid": "OTT167", "dccid": "300167", "visit_label": "V1", "site": "Ottawa", "sex": "Female", "cohort": "Fresh" }, "database": [ { "file": { "id": 1, "name": "sub-OTT167_ses-V1_task-faceO_eeg.edf", "summary": { "sampling_frequency": 512, "eeg_channels": 128, "eog_channels": 7, "reference": "CMS", "powerline_frequency": 60 }, "details": { "task_name": "FaceHouseCheck", "recording_type": "continuous", "recording_duration": 1201, "manufacturer": "BioSemi" }, "events": { "count": 1599, "instances": [ { "id": 1, "onset": 11.734, "duration": 0, "trial_type": "checker-right" }, { "id": 2, "onset": 12.533, "duration": 0, "trial_type": "house-upright" }, { "id": 3, "onset": 13.332, "duration": 0, "trial_type": "face-upright" }, "... 1,595 events omitted ...", { "id": 1599, "onset": 1179.062, "duration": 0, "trial_type": "face-inverted" } ], "extra_columns": {}, "hed_tag_count": 8, "hed_endorsements": [], "channel_delimiter": "," } } } ], "sessions": [166, 167, 168, 170, 171, 172, 173, 174, 175, 176], "previous_session": 166, "next_session": 168 }Notice
"extra_columns": {}After fix
{ "patient": { "pscid": "OTT167", "dccid": "300167", "visit_label": "V1", "site": "Ottawa" }, "database": [ { "file": { "id": 1, "name": "sub-OTT167_ses-V1_task-faceO_eeg.edf", "events": { "instances": [ { "PhysiologicalTaskEventID": 1, "Onset": "11.734000", "Duration": "0.000000", "TrialType": "checker-right" }, { "PhysiologicalTaskEventID": 2, "Onset": "12.533000", "Duration": "0.000000", "TrialType": "house-upright" }, { "PhysiologicalTaskEventID": 3, "Onset": "13.332000", "Duration": "0.000000", "TrialType": "face-upright" }, "... 1,595 events omitted ...", { "PhysiologicalTaskEventID": 1599, "Onset": "1179.062000", "Duration": "0.000000", "TrialType": "face-inverted" } ], "extra_columns": [], "hed_tags": [ "... 8 HED tags omitted ..." ], "hed_endorsements": [], "channel_delimiter": "," }, "datasetTags": { "... dataset-level HED mappings omitted ..." }, "datasetTagEndorsements": [], "output_type": "raw", "hedSchema": [ "... 1,623 schema nodes omitted ..." ] } } ], "sessions": [ 166, 167, 168, 170, 171, 172, 173, 174, 175, 176 ], "nextSession": 168, "prevSession": 166 }Notice
"extra_columns": []