mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
non active phase daily checklist
This commit is contained in:
@@ -1215,7 +1215,9 @@ func (s dailyChecklistService) AssignPhases(c *fiber.Ctx, id uint, req *validati
|
||||
}
|
||||
|
||||
if len(phaseIDs) > 0 {
|
||||
phases, err := s.PhaseRepo.GetByIDs(c.Context(), phaseIDs, nil)
|
||||
phases, err := s.PhaseRepo.GetByIDs(c.Context(), phaseIDs, func(db *gorm.DB) *gorm.DB {
|
||||
return db.Where("is_active = true")
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Phase not found")
|
||||
|
||||
Reference in New Issue
Block a user