From 25222cd3dcbf396c7d2a7372e32dd6e9ccae9ba4 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 6 Dec 2021 15:51:18 -0800 Subject: SIM pipeline: fix bug w/r/t issues with no fatcat coverage at all --- fatcat_scholar/sim_pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fatcat_scholar/sim_pipeline.py') diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py index cceec30..e140816 100644 --- a/fatcat_scholar/sim_pipeline.py +++ b/fatcat_scholar/sim_pipeline.py @@ -162,7 +162,7 @@ class SimPipeline: self.issue_db.db.row_factory = sqlite3.Row cur = self.issue_db.db.cursor() for row in cur.execute( - "SELECT * FROM sim_issue LEFT JOIN sim_pub ON sim_issue.sim_pubid = sim_pub.sim_pubid WHERE sim_issue.release_count < 3" + "SELECT * FROM sim_issue LEFT JOIN sim_pub ON sim_issue.sim_pubid = sim_pub.sim_pubid WHERE sim_issue.release_count < 3 sim_issue.release_count IS NULL" ): if should_skip_item(row["issue_item"]): continue @@ -199,7 +199,7 @@ class SimPipeline: self.issue_db.db.row_factory = sqlite3.Row cur = self.issue_db.db.cursor() for row in cur.execute( - f"SELECT * FROM sim_issue LEFT JOIN sim_pub ON sim_issue.sim_pubid = sim_pub.sim_pubid WHERE sim_issue.release_count < {max_release_count}" + f"SELECT * FROM sim_issue LEFT JOIN sim_pub ON sim_issue.sim_pubid = sim_pub.sim_pubid WHERE sim_issue.release_count < {max_release_count} OR sim_issue.release_count IS NULL" ): if should_skip_item(row["issue_item"]): continue -- cgit v1.2.3