diff --git a/reaction_board/web/queries.py b/reaction_board/web/queries.py index 0a08237..47906f1 100644 --- a/reaction_board/web/queries.py +++ b/reaction_board/web/queries.py @@ -321,7 +321,8 @@ class DashboardQueries: initial_import_count = 0 if first_seen_ts is not None: initial_import_count = int(conn.execute( - "SELECT COUNT(*) FROM video WHERE first_seen = ?", + "SELECT COUNT(*) FROM video WHERE first_seen = ? " + "AND status IN ('active','unfaved')", (int(first_seen_ts),), ).fetchone()[0]) diff --git a/tests/test_web_queries.py b/tests/test_web_queries.py index 2f4a083..4c89f64 100644 --- a/tests/test_web_queries.py +++ b/tests/test_web_queries.py @@ -35,6 +35,7 @@ def test_overview(): assert overview["data_date"] == DATES[-1] assert overview["snapshot_days"] == 3 assert overview["is_first_day"] is False + assert overview["initial_import_count"] == 2 assert overview["counts"]["active"] == 2 assert overview["counts"]["unfaved"] == 1 assert overview["counts"]["removed"] == 1