int-brain-lab / iblenv

Unified environment and Issue tracker for all IBL
MIT License
12 stars 10 forks source link

[Usage question] - How to filter sessions using session notes #141

Open GaelleChapuis opened 3 years ago

GaelleChapuis commented 3 years ago

Describe the question you have I would like to query sessions which have (or not) a specific notes e.g.

sess = one.alyx.rest('sessions', 'list', task_protocol='ephys',
                     django=f'project__name__icontains,ibl_neuropixel_brainwide_01,'
                            f'data_dataset_session_related__name__icontains,Camera.raw')
                            # f'notes__text__icontains,{str_notes_static}')  #TODO does not work

What is the nomenclature for "notes" here?

k1o0 commented 3 years ago

I'm not sure why this doesn't work. It's in the serializer: https://github.com/cortex-lab/alyx/blob/bb152752ff9548d66b77b29d5624d1145aa8fde7/alyx/actions/serializers.py#L150

Perhaps @oliche has an idea?