We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I get wired behaver:
While changing the order of AND conditions:
I get this user appear. While user have both many_to_many "he" and "ar"
This is the code I changed:
class FollowerLangField(StrField): name = 'language' model = Follower # def get_lookup_name(self): # print(f'language__id') # return 'language__id' # def get_lookup_value(self, value): # lang_id = Language.objects.filter(code_name=value).first().id # print(f'lang_id {lang_id}') # return lang_id def get_lookup(self, path, operator, value): _search = 'language__id' #'__'.join(path + [self.get_lookup_name()]) _op, invert = self.get_operator(operator) _value = Language.objects.filter(code_name=value).first().id print('debug get_lookup:',_search, _op, invert, _value) if operator == '!=': q = models.Q(**{'%s%s' % (_search, _op): _value}) else: q = models.Q(**{'%s%s' % (_search, _op): _value}) return ~q if invert else q ... model: class Follower(models.Model): language = models.ManyToManyField( "instagram_data.Language", verbose_name=_("language_code_name"), blank=True) class Language(models.Model): code_name = models.CharField(max_length=6, null=True, blank=True) def __str__(self): return self.code_name
It seems to ignore the second "language" condition.
Y?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I get wired behaver:
While changing the order of AND conditions:
I get this user appear.
While user have both many_to_many "he" and "ar"
This is the code I changed:
It seems to ignore the second "language" condition.
Y?
The text was updated successfully, but these errors were encountered: