Fix retrieving issues from cache when volume is incomplete

This commit is contained in:
Timmy Welch 2022-10-29 19:21:11 -07:00
parent 73dd33dc64
commit 618e15600f
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -450,6 +450,8 @@ class ComicCacher:
set_slots = ""
for key in data:
if data[key] is None:
continue
if keys != "":
keys += ", "

View File

@ -327,10 +327,11 @@ class ComicVineTalker:
def fetch_issues_by_volume(self, series_id: int) -> list[resulttypes.CVIssuesResults]:
# before we search online, look in our cache, since we might already have this info
volume_data = self.fetch_volume_data(series_id)
cvc = ComicCacher()
cached_volume_issues_result = cvc.get_volume_issues_info(series_id, self.source_name)
if cached_volume_issues_result:
if len(cached_volume_issues_result) >= volume_data["count_of_issues"]:
return cached_volume_issues_result
params = {