now create an owned on /owned, rather than /owned/-1 kludge. Also using sequence for creation. All good - made sequences for all relevant tables too. Last question is how to do redirect to /owneds and still show messsage

This commit is contained in:
2020-12-04 18:59:34 +11:00
parent ed07d1f9cb
commit d61e830525
4 changed files with 27 additions and 22 deletions

View File

@@ -112,6 +112,7 @@ class Book(db.Model):
def LastSubBookNum(self):
# need to work out the last sub book and return an id?
if self.IsParent():
# -1 subscript returns the last one
return self.child_ref[-1].sub_book_num
else:
return 1