fix(importing): don't overwrite session name when CSV has no session_name column

Presentation-only imports that link to sessions by code were silently
clearing session names because a missing column hit the else branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-11 18:20:36 -04:00
parent 3806613427
commit c9c69ec5f1

View File

@@ -662,7 +662,7 @@ async def event_importing_program_data(
event_session_data['event_location_id'] = event_location_id # INSERT and UPDATE the event_location_id in case the session was moved
if record.get('session_name'):
event_session_data['name'] = record.get('session_name', '').strip()
else:
elif 'session_name' in record:
event_session_data['name'] = None
# Max length of type_code is 25 characters. We must truncate it.