Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django_mongodb_backend/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def extract(self, compiler, connection):
def func(self, compiler, connection):
lhs_mql = process_lhs(self, compiler, connection, as_expr=True)
if self.function is None:
raise NotSupportedError(f"{self} may need an as_mql() method.")
raise NotSupportedError(f"{self.__class__.__name__} may need an as_mql() method.")
operator = MONGO_OPERATORS.get(self.__class__, self.function.lower())
return {f"${operator}": lhs_mql}

Expand Down
2 changes: 1 addition & 1 deletion tests/db_functions_/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

class FuncTests(SimpleTestCase):
def test_no_as_mql(self):
msg = "Func() may need an as_mql() method."
msg = "Func may need an as_mql() method."
with self.assertRaisesMessage(NotSupportedError, msg):
Func().as_mql(None, None)