fixed BUG-31 - ordering multiple series for a book
This commit is contained in:
3
BUGs
3
BUGs
@@ -4,6 +4,3 @@ BUG-7: if you remove a series from a book, it won't appear in the series drop-d
|
||||
|
||||
BUG-30: failed to add a book with 2 x same author (need to catch error
|
||||
or maybe mess with author list to remove duplicate potentials?)
|
||||
|
||||
BUG-31: series does not have 'series_num', so a book in 2 series, means he ordering is not explicit
|
||||
-> NEED TO display them in order of smallest num_books first
|
||||
|
||||
4
main.py
4
main.py
@@ -138,8 +138,8 @@ class Book(db.Model):
|
||||
title = db.Column(db.String(100), unique=True, nullable=False)
|
||||
publisher = db.Column(db.Integer, db.ForeignKey('publisher.id'))
|
||||
genre = db.relationship('Genre', secondary=Book_Genre_Link.__table__ )
|
||||
loan = db.relationship('Loan', secondary=Book_Loan_Link.__table__);
|
||||
series = db.relationship('Series', secondary=Book_Series_Link.__table__);
|
||||
loan = db.relationship('Loan', secondary=Book_Loan_Link.__table__)
|
||||
series = db.relationship('Series', secondary=Book_Series_Link.__table__,order_by=Series.num_books)
|
||||
bsl = db.relationship('Book_Series_Link', overlaps="series" )
|
||||
year_published = db.Column(db.Integer)
|
||||
condition = db.Column(db.Integer, db.ForeignKey('condition.id'))
|
||||
|
||||
Reference in New Issue
Block a user