Allow INITIAL_ASSESSMENT question sets without owner_type and owner_id

Made-with: Cursor
This commit is contained in:
Yared Yemane 2026-04-27 10:46:33 -07:00
parent 0d02eb1a24
commit 9cfd6c524e

View File

@ -606,15 +606,6 @@ func (h *Handler) CreateQuestionSet(c *fiber.Ctx) error {
})
}
if strings.EqualFold(req.SetType, string(domain.QuestionSetTypeInitialAssessment)) {
if req.OwnerType == nil || req.OwnerID == nil {
return c.Status(fiber.StatusBadRequest).JSON(domain.ErrorResponse{
Message: "Invalid initial assessment ownership",
Error: "INITIAL_ASSESSMENT question sets must include owner_type and owner_id",
})
}
}
input := domain.CreateQuestionSetInput{
Title: req.Title,
Description: req.Description,