Skip to content

Commit 900164d

Browse files
committed
fix(db): exclude legacy Pinata fallback rows from IPFS state queries
record_pinned_cid now uses a WHERE clause to only replace cid when it is NULL (new Pinata-only) or equals pinata_cid (legacy Pinata-only fallback). has_ipfs_cid and filter_ipfs_pinned_oids add AND cid IS DISTINCT FROM pinata_cid so legacy rows with cid = pinata_cid are not treated as IPFS-pinned.
1 parent 0e367b5 commit 900164d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/gitlawb-node/src/db

‎crates/gitlawb-node/src/db/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ impl Db {
22672267
.collect())
22682268
}
22692269

2270-
/// Returns true if this object has a real local IPFS CID (not a legacy
2270+
/// Returns true when this object has a real local IPFS CID (not a legacy
22712271
/// Pinata fallback where cid was set to pinata_cid for new rows).
22722272
pub async fn has_ipfs_cid(&self, sha256_hex: &str) -> Result<bool> {
22732273
let row = sqlx::query(

0 commit comments

Comments
 (0)