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:
@@ -171,6 +171,7 @@ export async function create_ae_obj__post_comment({
|
|||||||
child_type: 'post_comment',
|
child_type: 'post_comment',
|
||||||
fields: {
|
fields: {
|
||||||
account_id: account_id,
|
account_id: account_id,
|
||||||
|
post_id: post_id, // EXPLICIT mapping for backend database insertion
|
||||||
...data_kv
|
...data_kv
|
||||||
},
|
},
|
||||||
params,
|
params,
|
||||||
|
|||||||
@@ -32,24 +32,9 @@
|
|||||||
|
|
||||||
import { untrack } from 'svelte';
|
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(() => {
|
$effect(() => {
|
||||||
if (browser && $lq__post_obj?.post_id) {
|
if (browser && $lq__post_obj?.post_id) {
|
||||||
document.body.scrollIntoView();
|
document.body.scrollIntoView();
|
||||||
|
|
||||||
// const url = new URL(location);
|
|
||||||
// url.searchParams.set('post_id', $lq__post_obj?.post_id);
|
|
||||||
// history.pushState({}, '', url);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user