fix for tags
(cherry picked from commit baf38e12)
Co-authored-by: Matthias Saimpert matthias.saimpert@cern.ch
This bug seems to have been introduced during the migration to pymongo4.8
It may be elsewhere in the code, comments from @gstark would be useful