fixed BUG-34: possible series list is assuming a NULL sub_book_num is taking up a slot of books in series
This commit is contained in:
2
BUGs
2
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
|
||||
|
||||
@@ -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]})
|
||||
|
||||
Reference in New Issue
Block a user