Bug fixes and clean up of Dexie DB related
This commit is contained in:
@@ -1225,16 +1225,20 @@ function handle_db_save_ae_obj_li__event({obj_type, obj_li}) {
|
||||
|
||||
try {
|
||||
const id_random = await db_events.events.put({
|
||||
id_random: obj.event_id_random,
|
||||
id: obj.event_id_random,
|
||||
// id_random: obj.event_id_random,
|
||||
event_id: obj.event_id_random,
|
||||
event_id_random: obj.event_id_random,
|
||||
|
||||
account_id_random: obj.account_id_random,
|
||||
|
||||
code: obj.event_code,
|
||||
|
||||
account_id: obj.account_id_random,
|
||||
account_id_random: obj.account_id_random,
|
||||
|
||||
conference: obj.conference,
|
||||
type: obj.type,
|
||||
name: obj.name,
|
||||
summary: obj.summary,
|
||||
description: obj.description,
|
||||
|
||||
start_datetime: obj.start_datetime,
|
||||
@@ -1256,6 +1260,9 @@ function handle_db_save_ae_obj_li__event({obj_type, obj_li}) {
|
||||
notes: obj.notes,
|
||||
created_on: obj.created_on,
|
||||
updated_on: obj.updated_on,
|
||||
|
||||
// From SQL view
|
||||
file_count: obj.file_count,
|
||||
});
|
||||
// console.log(`Put obj with ID: ${obj.event_id_random} or ${id_random}`);
|
||||
} catch (error) {
|
||||
@@ -1490,12 +1497,15 @@ function handle_db_save_ae_obj_li__event_file({obj_type, obj_li}) {
|
||||
const id_random = await db_events.files.put({
|
||||
id: obj.event_file_id_random,
|
||||
id_random: obj.event_file_id_random,
|
||||
event_file_id: obj.event_file_id_random,
|
||||
event_file_id_random: obj.event_file_id_random,
|
||||
|
||||
hosted_file_id: obj.hosted_file_id_random,
|
||||
hosted_file_id_random: obj.hosted_file_id_random,
|
||||
hash_sha256: obj.hash_sha256, // Renamed with alias in FastAPI model
|
||||
|
||||
for_type: obj.for_type,
|
||||
for_id: obj.for_id_id_random,
|
||||
for_id_random: obj.for_id_random,
|
||||
|
||||
event_id_random: obj.event_id_random,
|
||||
@@ -1552,7 +1562,6 @@ function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||
try {
|
||||
const id_random = await db_events.sessions.put({
|
||||
id: obj.event_session_id_random,
|
||||
// id_random: obj.event_session_id_random,
|
||||
event_session_id: obj.event_session_id_random,
|
||||
event_session_id_random: obj.event_session_id_random,
|
||||
|
||||
@@ -1560,13 +1569,17 @@ function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||
code: obj.code,
|
||||
|
||||
for_type: obj.for_type,
|
||||
for_id: obj.for_id_id_random,
|
||||
for_id_random: obj.for_id_random,
|
||||
|
||||
type_code: obj.type_code,
|
||||
|
||||
event_id: obj.event_id_random,
|
||||
event_id_random: obj.event_id_random,
|
||||
event_location_id: obj.event_location_id_random,
|
||||
event_location_id_random: obj.event_location_id_random,
|
||||
|
||||
poc_person_id: obj.poc_person_id_random,
|
||||
poc_person_id_random: obj.poc_person_id_random,
|
||||
|
||||
name: obj.name,
|
||||
@@ -1594,7 +1607,6 @@ function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||
updated_on: obj.updated_on,
|
||||
|
||||
// From SQL view
|
||||
// event_name: obj.event_name,
|
||||
file_count: obj.file_count,
|
||||
|
||||
poc_person_given_name: obj.poc_person_given_name,
|
||||
@@ -1604,6 +1616,8 @@ function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||
poc_person_passcode: obj.poc_person_passcode,
|
||||
poc_kv_json: obj.poc_kv_json,
|
||||
|
||||
event_name: obj.event_name,
|
||||
|
||||
event_location_code: obj.event_location_code,
|
||||
event_location_name: obj.event_location_name,
|
||||
});
|
||||
@@ -1633,18 +1647,25 @@ function handle_db_save_ae_obj_li__event_presentation({obj_type, obj_li}) {
|
||||
|
||||
try {
|
||||
const id_random = await db_events.presentations.put({
|
||||
id_random: obj.event_presentation_id_random,
|
||||
id: obj.event_presentation_id_random,
|
||||
// id_random: obj.event_presentation_id_random,
|
||||
event_presentation_id: obj.event_presentation_id_random,
|
||||
event_presentation_id_random: obj.event_presentation_id_random,
|
||||
|
||||
external_id: obj.external_id,
|
||||
code: obj.code,
|
||||
|
||||
for_type: obj.for_type,
|
||||
for_id: obj.for_id_random,
|
||||
for_id_random: obj.for_id_random,
|
||||
|
||||
type_code: obj.type_code,
|
||||
|
||||
event_id: obj.event_id_random,
|
||||
event_id_random: obj.event_id_random,
|
||||
event_session_id: obj.event_session_id_random,
|
||||
event_session_id_random: obj.event_session_id_random,
|
||||
event_abstract_id: obj.event_abstract_id_random,
|
||||
event_abstract_id_random: obj.event_abstract_id_random,
|
||||
|
||||
abstract_code: obj.abstract_code,
|
||||
@@ -1659,8 +1680,6 @@ function handle_db_save_ae_obj_li__event_presentation({obj_type, obj_li}) {
|
||||
|
||||
hide_event_launcher: obj.hide_event_launcher,
|
||||
|
||||
// data_json: obj.data_json,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
@@ -1669,6 +1688,10 @@ function handle_db_save_ae_obj_li__event_presentation({obj_type, obj_li}) {
|
||||
notes: obj.notes,
|
||||
created_on: obj.created_on,
|
||||
updated_on: obj.updated_on,
|
||||
|
||||
// From SQL view
|
||||
event_session_code: obj.event_session_code,
|
||||
event_session_name: obj.event_session_name,
|
||||
});
|
||||
// console.log(`Put obj with ID: ${obj.event_presentation_id_random} or ${id_random}`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user