fix(web): count initial import from tracked videos
This commit is contained in:
1 parent
456e06f105
commit
7fcd1db987
2 files changed
+3
-1
No files matched your search
@@ -321,7 +321,8 @@ class DashboardQueries:
|
|||||||
initial_import_count = 0
|
initial_import_count = 0
|
||||||
if first_seen_ts is not None:
|
if first_seen_ts is not None:
|
||||||
initial_import_count = int(conn.execute(
|
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),),
|
(int(first_seen_ts),),
|
||||||
).fetchone()[0])
|
).fetchone()[0])
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ def test_overview():
|
|||||||
assert overview["data_date"] == DATES[-1]
|
assert overview["data_date"] == DATES[-1]
|
||||||
assert overview["snapshot_days"] == 3
|
assert overview["snapshot_days"] == 3
|
||||||
assert overview["is_first_day"] is False
|
assert overview["is_first_day"] is False
|
||||||
|
assert overview["initial_import_count"] == 2
|
||||||
assert overview["counts"]["active"] == 2
|
assert overview["counts"]["active"] == 2
|
||||||
assert overview["counts"]["unfaved"] == 1
|
assert overview["counts"]["unfaved"] == 1
|
||||||
assert overview["counts"]["removed"] == 1
|
assert overview["counts"]["removed"] == 1
|
||||||
|
|||||||
Reference in new issue
Block a user