Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier committed Dec 2, 2024
1 parent 02748dd commit 9fe660a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/stores/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ impl Store for PostgresStore {
"INSERT INTO data_sources_documents \
(id, data_source, created, document_id, timestamp, tags_array, parents, \
source_url, hash, text_size, chunk_count, status) \
VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING id, created, token_count",
VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING id, created",
)
.await?;

Expand All @@ -1806,7 +1806,6 @@ impl Store for PostgresStore {

let _id: i64 = r.get(0);
let created: i64 = r.get(1);
let token_count: Option<i64> = r.get(2);

tx.commit().await?;

Expand All @@ -1820,10 +1819,10 @@ impl Store for PostgresStore {
source_url: params.source_url,
hash: params.hash,
text_size: params.text_size,
chunk_count: params.chunk_count as usize,
chunk_count: params.chunk_count,
chunks: vec![],
text: None,
token_count: token_count.map(|t| t as usize),
token_count: None,
})
}

Expand Down

0 comments on commit 9fe660a

Please sign in to comment.