Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOT IN (>>) operator is not working on v0.2.2 #607

Closed
deepsghimire opened this issue Apr 26, 2024 · 1 comment
Closed

NOT IN (>>) operator is not working on v0.2.2 #607

deepsghimire opened this issue Apr 26, 2024 · 1 comment

Comments

@deepsghimire
Copy link

commit dabd0fc introduced following changes in aredis_om/model/model.py

  elif op is Operators.NOT_IN:
                 # TODO: Implement NOT_IN, test this...
                 expanded_value = cls.expand_tag_value(value)
-                result += f"-(@{field_name}:{{{expanded_value}}})"
+                result += "-(@{field_name}):{{{expanded_value}}}".format(
+                    field_name=field_name, expanded_value=expanded_value
+                )

note the placement of right parenthesis

shouldn't this be following?

  elif op is Operators.NOT_IN:
                 # TODO: Implement NOT_IN, test this...
                 expanded_value = cls.expand_tag_value(value)
-                result += f"-(@{field_name}:{{{expanded_value}}})"
+                result += "-(@{field_name}:{{{expanded_value}}})".format(
+                    field_name=field_name, expanded_value=expanded_value
+                )
@slorello89
Copy link
Member

Good catch, fixed in #603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants