Fix(IDAA): Harden Recovery Meetings search and fix detail page crash
- Search Hardening: Implemented 'Inclusive OR' logic for physical/virtual filters and restored robust full-text search using 'default_qry_str' with wildcards. - Crash Fix: Added null checks for 'contact_li_json' in meeting detail view to prevent TypeError. - ID Stability: Enhanced 'core__idb_dexie.ts' to support 'id_random' mapping and fixed misleading save logging. - Reliability: Both V2 and V3 search paths now consistently return processed objects with standardized IDs.
This commit is contained in:
@@ -13,11 +13,11 @@ function find_object_id(
|
||||
table_name: string,
|
||||
log_lvl: number
|
||||
): string | number | undefined {
|
||||
const potential_keys = ['id', `${table_name}_id`, `${table_name}_id_random`];
|
||||
const potential_keys = ['id', 'id_random', `${table_name}_id`, `${table_name}_id_random`];
|
||||
|
||||
for (const key of potential_keys) {
|
||||
if (obj[key]) {
|
||||
if (key !== 'id' && log_lvl > 0) {
|
||||
if (key !== 'id' && log_lvl > 1) {
|
||||
console.warn(
|
||||
`Found legacy ID key "${key}" for table "${table_name}". Consider standardizing to "id".`,
|
||||
obj
|
||||
@@ -115,7 +115,7 @@ export async function db_save_ae_obj_li__ae_obj<T extends Record<string, any>>({
|
||||
// bulkPut efficiently handles both inserts and updates.
|
||||
const keys = await db_table.bulkPut(data_to_save);
|
||||
if (log_lvl > 0) {
|
||||
console.log(`Successfully saved ${keys.length} objects to "${table_name}".`);
|
||||
console.log(`Successfully saved ${data_to_save.length} objects to "${table_name}".`);
|
||||
}
|
||||
return keys;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user