refactor: improve event file loader stability and ID integrity

- Implemented a safety net in '_refresh_file_li_background' to inject missing 'for_id' and 'for_type' from query context.
- Fixed a bug in '_process_generic_props' where 'null' random IDs could overwrite clean IDs.
- Enabled initial debugging logs for event file processing.
This commit is contained in:
Scott Idem
2026-02-06 17:25:42 -05:00
parent 4eabc7eeba
commit d53a2789ae
2 changed files with 64 additions and 28 deletions

View File

@@ -434,26 +434,26 @@ export interface File {
id: string;
id_random: string;
event_file_id: string;
event_file_id_random: string;
// event_file_id_random: string;
hosted_file_id: string;
hosted_file_id_random: string;
// hosted_file_id_random: string;
hash_sha256: string;
for_type?: string;
for_id?: string;
for_id_random?: string;
// for_id_random?: string;
event_id: string;
event_id_random: string;
// event_id_random: string;
event_session_id?: string;
event_session_id_random?: string;
// event_session_id_random?: string;
event_presentation_id?: string;
event_presentation_id_random?: string;
// event_presentation_id_random?: string;
event_presenter_id?: string;
event_presenter_id_random?: string;
// event_presenter_id_random?: string;
event_location_id?: string;
event_location_id_random?: string;
// event_location_id_random?: string;
filename: string;
extension: string;
@@ -873,12 +873,11 @@ export class MySubClassedDexie extends Dexie {
enable, hide, priority, sort, group, notes, created_on, updated_on`,
file: `
id, id_random, event_file_id, event_file_id_random,
hosted_file_id, hosted_file_id_random,
id, event_file_id,
hosted_file_id,
hash_sha256,
for_type, for_id, for_id_random,
for_type, for_id,
event_id, event_session_id, event_presentation_id, event_presenter_id, event_location_id,
event_id_random, event_session_id_random, event_presentation_id_random, event_presenter_id_random, event_location_id_random,
filename, extension,
lu_file_purpose_id, lu_event_file_purpose_name, file_purpose,
tmp_sort_1, tmp_sort_2,