add createTopic and updateTopic; fix create/update Shout

This commit is contained in:
knst-kotov
2021-12-12 18:29:51 +03:00
parent 04f2ceb629
commit 1c0e977a60
4 changed files with 53 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ class Topic(Base):
title: str = Column(String, nullable=False, comment="Title")
body: str = Column(String, nullable=True, comment="Body")
pic: str = Column(String, nullable=True, comment="Picture")
children = Column(JSONType, nullable=True, comment="list of children topics")
children = Column(JSONType, nullable=True, default = [], comment="list of children topics")
community = Column(ForeignKey("community.slug"), nullable=False, comment="Community")
class TopicStorage: