fix(idaa): resolve BB comment IntegrityError and infinite loop

- Explicitly mapped 'post_id' in create_nested_obj_v3 payload.
- Removed redundant background load trigger in view component.
- Stabilized parent-child relationship for V3 API mapping.
- Resolved persistent 400 error during comment creation.
This commit is contained in:
Scott Idem
2026-02-05 20:25:23 -05:00
parent d6b6e988eb
commit 73c687ac5a
2 changed files with 1 additions and 15 deletions

View File

@@ -171,6 +171,7 @@ export async function create_ae_obj__post_comment({
child_type: 'post_comment',
fields: {
account_id: account_id,
post_id: post_id, // EXPLICIT mapping for backend database insertion
...data_kv
},
params,

View File

@@ -32,24 +32,9 @@
import { untrack } from 'svelte';
$effect(() => {
const post_id = $idaa_slct.post_id;
if (post_id && post_id !== untrack(() => $idaa_trig.post_id)) {
if (log_lvl) {
console.log(`Post ID selected: ${post_id}`);
}
// Trigger background load only if it's a new ID
$idaa_trig.post_id = post_id;
}
});
$effect(() => {
if (browser && $lq__post_obj?.post_id) {
document.body.scrollIntoView();
// const url = new URL(location);
// url.searchParams.set('post_id', $lq__post_obj?.post_id);
// history.pushState({}, '', url);
}
});