on the application side, get only the tenders with deadlines that have not passed
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user