oclib then

This commit is contained in:
mr
2026-04-03 14:18:07 +02:00
parent 450e917227
commit 913d9b3dfb
14 changed files with 64 additions and 49 deletions

View File

@@ -102,12 +102,12 @@ func GetBson(filters *Filters) bson.D {
}
}
if len(orList) > 0 && len(andList) == 0 {
f = bson.D{{"$or", orList}}
f = bson.D{{Key: "$or", Value: orList}}
} else {
if len(orList) > 0 {
andList = append(andList, bson.M{"$or": orList})
}
f = bson.D{{"$and", andList}}
f = bson.D{{Key: "$and", Value: andList}}
}
}
return f