Clinical-Genomics-Lund / bonsai

Visualize and analyze resistance and outbreak of bacterial pathogen
https://bonsai-wgs.readthedocs.io/en/latest/
4 stars 1 forks source link

unsupported operator in sample summary pipeline crashes both api and client #75

Closed alkc closed 11 months ago

alkc commented 11 months ago

Describe the bug

An optional mlst projection includes the $getField operator, which is only supported in mongo v5 and higher. This leads to the api + client crashing both with an internal server error on our 'ol production server.

https://github.com/Clinical-Genomics-Lund/bonsai/blob/d90a89908f772f29e0a930b04e96b8fdc06b156e/server/app/crud/sample.py#L100-L106

Current workaround is to disable this part, but probably needs to be rewritten w/o $getField