country filter fix
This commit is contained in:
@@ -1071,7 +1071,13 @@ func (r *tenderRepository) buildSearchFilter(form *SearchForm) bson.M {
|
||||
if and, ok := filter["$and"].([]bson.M); ok {
|
||||
filter["$and"] = append(and, scrapedClause)
|
||||
} else {
|
||||
filter["$and"] = []bson.M{filter, scrapedClause}
|
||||
existing := bson.M{}
|
||||
for k, v := range filter {
|
||||
existing[k] = v
|
||||
}
|
||||
filter = bson.M{
|
||||
"$and": []bson.M{existing, scrapedClause},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user