Commit Graph

21 Commits

Author SHA1 Message Date
Scott Idem
21e0825841 fix(importing): restore presenter INSERT; fix column-overwrite on partial CSV
Session + presentation fields no longer overwritten when columns are absent
from the CSV (start_datetime, end_datetime, sort, code, name, abstract_code).

Presentation lookup no longer requires presentation_name to find an existing
record — only INSERT requires it. This fixes presenter email updates when
re-importing a partial CSV that has presenter_code but no presentation_name.

Presenter email is now only written when the presenter_email column is
present in the CSV, preventing accidental email clears on partial imports.

Presenter INSERT/UPDATE gate restored to original logic: requires
(presenter_code or presenter_number) and presenter_given_name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:25:05 -04:00
Scott Idem
5b01800b9a wip(importing): partial fixes — presentation lookup + presenter gate (broken, needs rework)
Session field column-presence fixes are solid. Presentation lookup no longer
requires presentation_name to find existing records. Presenter gate broadened
to run lookup even without explicit code. Presenter INSERT still broken —
reverted field changes after IntegrityError issue; email-only column guard kept.

Do not rely on this state for presenter creation. Needs rework from c9c69ec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 15:19:21 -04:00
Scott Idem
c9c69ec5f1 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>
2026-06-11 18:20:36 -04:00
Scott Idem
c64c3bc55a fix(importing): normalize non-breaking spaces in CSV datetime fields
Google Sheets embeds \xa0 (non-breaking space) in 12-hour time values
(e.g. "3:00\xa0PM") and when date/time columns are combined. This caused
MariaDB datetime INSERTs to fail with an OperationalError.

Adds _clean_datetime() which strips \xa0, normalizes whitespace, and
parses common import formats (M/D/YYYY H:MM AM/PM, etc.) into
YYYY-MM-DD HH:MM:SS before the DB write. Applied to all four datetime
fields: session and presentation start/end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 10:15:13 -04:00
Scott Idem
6d04a8ac19 New link and sync function. It is mostly good to go, but could probably use more testing and improvements. 2025-06-24 18:48:38 -04:00
Scott Idem
882c740880 Finally getting rid of the old display_name fields. Trying to use full_name and full_name_override everywhere. 2025-06-16 19:22:02 -04:00
Scott Idem
c4b9396f52 Updates before BGH 2025 2025-03-25 15:27:15 -04:00
Scott Idem
0e110d69f2 Small workaround to limit type code to 25 characters. The database table won't update correctly or something. 2024-08-16 14:43:22 -04:00
Scott Idem
2ef883984d Updates to the event program data import script. 2024-08-15 09:39:15 -04:00
Scott Idem
19082a7a10 Adding cfg_json and data_json fields to more models 2024-06-11 13:35:00 -04:00
Scott Idem
ea81d619be Updating things for LCI 2024-06-10 19:00:35 -04:00
Scott Idem
9140455795 Getting ready for LCI importing of pre program data 2024-06-09 18:31:16 -04:00
Scott Idem
de822fb1ba Now imports the session type_code data 2024-05-07 10:21:07 -04:00
Scott Idem
faecd974b9 Lots of changes to get to FastAPI 95.1 2024-04-26 15:15:37 -04:00
Scott Idem
80b218c816 Minor improvements for importing 2024-03-25 11:48:10 -04:00
e4ef026c47 Improvement with event program data importing 2023-05-13 17:04:51 -04:00
Scott Idem
c1f68522aa Prep for AAPOR with Confex and NCSD STD. General clean up. 2023-05-02 09:50:24 -04:00
Scott Idem
6cfd76c788 Minor changes 2022-10-10 11:27:44 -04:00
Scott Idem
e36a95fd76 Work on event program data importing. 2022-10-07 17:47:58 -04:00
Scott Idem
86b06226cb General code clean up 2022-01-24 13:06:27 -05:00
Scott Idem
53c6c6b51c Work on event importing and related 2021-10-19 21:21:11 -04:00