add sections to BookVersion

This commit is contained in:
SvyatoslavArtymovych 2023-04-21 17:17:31 +03:00
parent 3899ed44e1
commit 3638ad3108
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class BookVersion(BaseModel):
# Relationships
book = db.relationship("Book", viewonly=True)
derivative = db.relationship("BookVersion", remote_side=[id])
sections = db.relationship("Section", viewonly=True)
def __repr__(self):
return f"<{self.id}: {self.semver}>"