aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-12-06 15:51:18 -0800
committerBryan Newbold <bnewbold@archive.org>2021-12-06 15:51:18 -0800
commit25222cd3dcbf396c7d2a7372e32dd6e9ccae9ba4 (patch)
tree7fdca7b0c80d51dcb894cbe4b4d60eca632a55b8
parent1389c0fdf03b002b2a555f9a69755c4798b5530e (diff)
downloadfatcat-scholar-25222cd3dcbf396c7d2a7372e32dd6e9ccae9ba4.tar.gz
fatcat-scholar-25222cd3dcbf396c7d2a7372e32dd6e9ccae9ba4.zip
SIM pipeline: fix bug w/r/t issues with no fatcat coverage at all
-rw-r--r--fatcat_scholar/sim_pipeline.py4
1 files changed, 2 insertions, 2 deletions
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