now order_by sub_book_num in child_ref array, fixed BUG with series ordering for series:112
This commit is contained in:
1
BUGs
1
BUGs
@@ -6,7 +6,6 @@
|
||||
* alter a condition, covertype, etc. and its not in drop-down list (even though db look via index is correct, e.g books.html shows updated covertype)
|
||||
* show books, only shows first author
|
||||
* starting on series remove button. If we click a subbook, then remove series button needs to be clever (might need client-side validation / confirmation, eg. this is a subbook, you want to remove all of the sub books from the series?)
|
||||
* series: 112, book/sub-book ordering is broken
|
||||
* author,series, etc. do not have explicit ordering like sub-books... sort of irritating / needs code and DB fix
|
||||
* add/remove authors, and after save they are ordered by author.id, not order of addition (prob. needs book_author_link to have an auth_num)
|
||||
* if you remove a series from a book, it won't appear in the series drop-down if it is the first 'missing' book in that series -- either reset the list, or show all series always?
|
||||
|
||||
2
main.py
2
main.py
@@ -93,7 +93,7 @@ class Book(db.Model):
|
||||
# take actual parent book as there is no real associated sub_book_num data and can just use it
|
||||
parent = db.relationship('Book', secondary=Book_Sub_Book_Link.__table__, primaryjoin="Book.id==Book_Sub_Book_Link.sub_book_id", secondaryjoin="Book.id==Book_Sub_Book_Link.book_id" )
|
||||
# but use child_ref as sub_book_num is per book, and I can't connect an empty array of sub_book_nums to a child book array in "child"
|
||||
child_ref = db.relationship('Book_Sub_Book_Link', secondary=Book_Sub_Book_Link.__table__, primaryjoin="Book.id==Book_Sub_Book_Link.book_id", secondaryjoin="Book.id==Book_Sub_Book_Link.sub_book_id" )
|
||||
child_ref = db.relationship('Book_Sub_Book_Link', secondary=Book_Sub_Book_Link.__table__, primaryjoin="Book.id==Book_Sub_Book_Link.book_id", secondaryjoin="Book.id==Book_Sub_Book_Link.sub_book_id", order_by="Book_Sub_Book_Link.sub_book_num" )
|
||||
|
||||
|
||||
def IsParent(self):
|
||||
|
||||
Reference in New Issue
Block a user