diff --git a/BUGs b/BUGs index 3dcedf5..5bd8927 100644 --- a/BUGs +++ b/BUGs @@ -11,5 +11,3 @@ BUG-31: series does not have 'series_num', so a book in 2 series, means he o a larger one, and numbering implies the inner (smaller number), and outer has explicity overall ordering of books in both series, so should be ok? - -BUG-34: possible series list is assuming a NULL sub_book_num is taking up a slot of books in series diff --git a/series.py b/series.py index 605f916..3b55d65 100644 --- a/series.py +++ b/series.py @@ -49,7 +49,7 @@ def CalcAvgRating(sid): def ListOfSeriesWithMissingBooks(): with db.engine.connect() as conn: - res=conn.exec_driver_sql( "select id, title, num_books, count from ( select s.id, s.title, s.num_books, count(bsl.book_id) from series s left outer join book_series_link bsl on bsl.series_id=s.id group by s.id) as foo where num_books > count") + res=conn.exec_driver_sql( "select id, title, num_books, count from ( select s.id, s.title, s.num_books, count(bsl.book_id) from series s left outer join book_series_link bsl on bsl.series_id=s.id where bsl.book_num is not null group by s.id) as foo where num_books > count") tmp=[] for row in res: tmp.append({'id': row[0], 'title': row[1]})