add/remove series from a book now works, havent thought about removing a parent book fro a series, but otherwise you can add more than one series, remove as well, and it works in the DB

This commit is contained in:
2020-12-13 22:21:38 +11:00
parent e3d21a9438
commit c102b93872
5 changed files with 154 additions and 17 deletions

View File

@@ -44,6 +44,13 @@ def CalcAvgRating(sid):
print( row )
return row.rating
def ListOfSeriesWithMissingBooks():
res=db.engine.execute("select id, title, num_books, count from ( select s.id, s.title, s.num_books, count(bsl.book_id) from series s, book_series_link bsl where s.id = bsl.series_id group by s.id ) as foo where num_books > count")
tmp=[]
for row in res:
tmp.append({'id': row[0], 'title': row[1]})
return tmp
################################################################################
# Routes for series data
#