mongoke icon indicating copy to clipboard operation
mongoke copied to clipboard

`$or` and `$and` operators do not work

Open shirouto opened this issue 5 years ago • 0 comments

Hi there.

It appears the mongo operators are not properly instrumented when they appear inside arrays/lists. For example something like:

{and: [{field1: {eq: val1}},  {field2: {eq: val2}}]}

will not be properly resolved. Specifically, eq will not be transformed to $eq.

The issue seems to be because the code in the template mongoke/templates/resolvers_support.py that does not recurse through lists (only dictionaries). Something like shirouto/mongoke@f88a5398c50fca34b8fa349651473fb877d63cf9 seems to fix it.

Cheers

shirouto avatar Sep 23 '20 19:09 shirouto