fix creating shout

This commit is contained in:
knst-kotov
2021-12-17 17:14:08 +01:00
parent 931fd887d9
commit e3bc1c0c38
3 changed files with 21 additions and 16 deletions

View File

@@ -318,7 +318,7 @@ class Shout(Base):
id = None
slug: str = Column(String, primary_key=True)
community: int = Column(Integer, ForeignKey("community.id"), nullable=True, comment="Community")
community: int = Column(Integer, ForeignKey("community.id"), nullable=False, comment="Community")
body: str = Column(String, nullable=False, comment="Body")
createdAt: str = Column(DateTime, nullable=False, default = datetime.now, comment="Created at")
updatedAt: str = Column(DateTime, nullable=True, comment="Updated at")