on the application side, get only the tenders with deadlines that have not passed

This commit is contained in:
Mazyar
2026-05-04 06:14:25 +03:30
parent 086fe0ffd5
commit 2de7301d44
4 changed files with 20 additions and 29 deletions
+3 -4
View File
@@ -305,13 +305,12 @@ func (s *tenderService) Recommend(ctx context.Context, form *SearchForm, paginat
if form.CompanyID != nil && *form.CompanyID != "" {
company, err := s.companyService.GetByID(ctx, *form.CompanyID)
if err != nil {
s.logger.Error("Failed to get company", map[string]interface{}{
s.logger.Error("Failed to get company for CPV codes, skipping CPV-based filtering", map[string]interface{}{
"company_id": form.CompanyID,
"error": err.Error(),
})
return nil, fmt.Errorf("failed to get company: %w", err)
}
if company.Tags != nil && len(company.Tags.CPVCodes) > 0 {
// Continue without CPV-based filtering instead of failing
} else if company.Tags != nil && len(company.Tags.CPVCodes) > 0 {
form.Classifications = company.Tags.CPVCodes
}
}