separate CommentFlag from CreatedBase

inherit Base = declarative_base() directly instead
key to understanding was https://stackoverflow.com/questions/9088957/sqlalchemy-cannot-find-a-class-name
This commit is contained in:
Viet Than 2023-07-11 23:43:39 -04:00
parent 82d404bafb
commit 14d5a012ac
2 changed files with 6 additions and 4 deletions

View file

@ -71,7 +71,7 @@ class Comment(CreatedBase):
viewonly=True)
reports = relationship("CommentFlag",
primaryjoin="CommentFlag.comment_id == Comment.id",
order_by="CommentFlag.created_utc",
order_by="CommentFlag.created_timestampz",
viewonly=True)
notes = relationship("UserNote", back_populates="comment")