From 88f4ca66d77b3e3d5890a1ac04f2c2d13a426b47 Mon Sep 17 00:00:00 2001 From: xenofem Date: Fri, 29 Mar 2024 15:16:49 -0400 Subject: [PATCH] don't collate works that haven't had metadata fetched yet --- dlibrary/dlibrary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index 14adba3..330baef 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -362,9 +362,9 @@ def collate(args): work_collation_dir.rmdir() virtual = cur.execute("SELECT virtual FROM works WHERE id = ?", (work_id,)).fetchone() - if virtual == (1,): + if virtual in [(1,), None]: if work_id in specified_works: - print(f'Work {work_id} is virtual!') + print(f'Work {work_id} {"is virtual" if virtual == (1,) else "has no metadata"}!') any_warnings = True break continue