Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ibllib/oneibl/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ def register_session(self, ses_path, file_list=True, projects=None, procedures=N
procedures = [procedures] if isinstance(procedures, str) else (procedures or [])
json_fields_names = ['IS_MOCK', 'IBLRIG_VERSION']
json_field = {k: settings[0].get(k) for k in json_fields_names}
for field in ('PROJECT_EXTRACTION_VERSION', 'TASK_VERSION'):
if value := settings[0].get(field):
# Add these fields only if they exist and are not None
json_field[field] = value
# The poo count field is only updated if the field is defined in at least one of the settings
poo_counts = [md.get('POOP_COUNT') for md in settings if md.get('POOP_COUNT') is not None]
if poo_counts:
Expand Down
Loading