Skip to content

Commit

Permalink
Fix incorrect logging of multiple issues for single series id
Browse files Browse the repository at this point in the history
  • Loading branch information
mizaki committed Aug 10, 2024
1 parent e00739b commit 1cee196
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gcd_talker/gcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,11 @@ def _fetch_issue_data(self, series_id: int, issue_number: str) -> GenericMetadat

sql_query: str = ""
sql_base: str = "SELECT gcd_issue.id AS 'id' FROM gcd_issue "
sql_where: str = "WHERE gcd_issue.series_id=? AND gcd_issue.number=?"
sql_where_nn: str = "WHERE gcd_issue.series_id=? AND (gcd_issue.number=? OR gcd_issue.number='[nn]')"
sql_where: str = "WHERE gcd_issue.series_id=? AND gcd_issue.number=? AND gcd_issue.variant_of_id IS NULL "
sql_where_nn: str = (
"WHERE gcd_issue.series_id=? AND gcd_issue.variant_of_id IS NULL AND "
"(gcd_issue.number=? OR gcd_issue.number='[nn]')"
)

if self.nn_is_issue_one and issue_number == "1":
sql_query = sql_base + sql_where_nn
Expand Down

0 comments on commit 1cee196

Please sign in to comment.