fix: ignore pending XFTP files in storage accounting (#1814)

* fix: ignore pending XFTP files in storage accounting

* style

---------

Co-authored-by: Paul Bottinelli <paul.bottinelli@trailofbits.com>
This commit is contained in:
Evgeny
2026-06-21 13:27:28 +01:00
committed by GitHub
co-authored by Paul Bottinelli
parent 74a86043cc
commit b2bdade380
3 changed files with 43 additions and 22 deletions
@@ -164,7 +164,7 @@ instance FileStoreClass PostgresFileStore where
getUsedStorage st =
withTransaction (dbStore st) $ \db -> do
[Only total] <- DB.query_ db "SELECT COALESCE(SUM(file_size::BIGINT), 0)::BIGINT FROM files"
[Only total] <- DB.query_ db "SELECT COALESCE(SUM(file_size::BIGINT), 0)::BIGINT FROM files WHERE file_path IS NOT NULL"
pure total
getFileCount st =