From fc287188468cf4b6a6239bc325d46709bfe4b8db Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 1 May 2021 13:08:27 -0700 Subject: [PATCH] Allow authorless posts --- amanuensis/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amanuensis/models.py b/amanuensis/models.py index 5d57ac9..fa44795 100644 --- a/amanuensis/models.py +++ b/amanuensis/models.py @@ -561,7 +561,8 @@ class Post(ModelBase): lexicon_id = Column(Integer, ForeignKey('lexicon.id'), nullable=False) # The user who made the post - user_id = Column(Integer, ForeignKey('user.id'), nullable=False) + # This may be NULL if the post was made by Amanuensis + user_id = Column(Integer, ForeignKey('user.id'), nullable=True) ################ # Post content #