From 5a28afc540b9b5361c77f2b3c16b967aef380674 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Sun, 20 Jul 2025 17:34:57 -0300 Subject: [PATCH] fix the entry model to not allow the title nor the date to be null --- src/pilgrim/models/entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pilgrim/models/entry.py b/src/pilgrim/models/entry.py index a9984aa..7835067 100644 --- a/src/pilgrim/models/entry.py +++ b/src/pilgrim/models/entry.py @@ -11,9 +11,9 @@ from pilgrim.database import Base class Entry(Base): __tablename__ = "entries" id = Column(Integer, primary_key=True) - title = Column(String) + title = Column(String,nullable=False) text = Column(String) - date = Column(DateTime) + date = Column(DateTime,nullable=False) photos = relationship( "Photo", secondary=photo_entry_association,