Skip to content

Commit

Permalink
fix: Ensure aiGeneratedDescription is JSON stringified before DB update
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 25, 2024
1 parent 16768c8 commit 46618e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/deno-kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@ export async function listenQueue(kv: Deno.Kv) {

if (aiGeneratedDescription) {
await client_1.queryObject({
args: [aiGeneratedDescription, propertyData.id],
args: [
JSON.stringify(aiGeneratedDescription),
propertyData.id,
],
text: `UPDATE Property SET ai_generated_description = $1 WHERE id = $2`,
});
}
Expand Down

0 comments on commit 46618e7

Please sign in to comment.