diff --git a/core/services/quiz/models.py b/core/services/quiz/models.py index 46894958..09033a32 100644 --- a/core/services/quiz/models.py +++ b/core/services/quiz/models.py @@ -12,10 +12,10 @@ class AnswerDB(SQLModel, table=True): id: Optional[int] = Field(default=None, sa_column=Column(Integer, primary_key=True, autoincrement=True)) question_id: Optional[int] = Field( - sa_column=Column(Integer, ForeignKey("question.id", ondelete="RESTRICT", onupdate="RESTRICT")) + default=None, sa_column=Column(Integer, ForeignKey("question.id", ondelete="RESTRICT", onupdate="RESTRICT")) ) - is_correct: Optional[bool] = Field() - text: Optional[str] = Field() + is_correct: Optional[bool] = Field(default=None) + text: Optional[str] = Field(default=None) class QuestionDB(SQLModel, table=True): @@ -23,7 +23,7 @@ class QuestionDB(SQLModel, table=True): __table_args__ = dict(mysql_charset="utf8mb4", mysql_collate="utf8mb4_general_ci") id: Optional[int] = Field(default=None, sa_column=Column(Integer, primary_key=True, autoincrement=True)) - text: Optional[str] = Field() + text: Optional[str] = Field(default=None) class Answer(BaseModel): diff --git a/gram_core b/gram_core index bf5b1530..d10f0d48 160000 --- a/gram_core +++ b/gram_core @@ -1 +1 @@ -Subproject commit bf5b153001defd150d4dcc17b9baf06a3769adf0 +Subproject commit d10f0d4815d70804ea38686346671d230b7ab84c