Skip to content
New issue

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

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

Already on GitHub? # to your account

Add a better error message when a Func is missing as_mql() #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timgraham
Copy link
Collaborator

I have seen this too many times:

  File "/home/tim/code/django-mongodb/django_mongodb_backend/functions.py", line 105, in func
    operator = MONGO_OPERATORS.get(self.__class__, self.function.lower())
                                                   ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

@timgraham timgraham force-pushed the func-error-message branch from 017a567 to 4de9516 Compare April 6, 2025 01:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants