Skip to content

Commit 7dd6e0d

Browse files
committed
fix typo in function name: perserve -> preserve
1 parent 6f409db commit 7dd6e0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django_mongodb/functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def null_if(self, compiler, connection):
131131
return {"$cond": {"if": {"$eq": [expr1, expr2]}, "then": None, "else": expr1}}
132132

133133

134-
def perserve_null(operator):
134+
def preserve_null(operator):
135135
# If the argument is null, the function should return null, not
136136
# $toLower/Upper's behavior of returning an empty string.
137137
def wrapped(self, compiler, connection):
@@ -201,7 +201,7 @@ def register_functions():
201201
Left.as_mql = left
202202
Length.as_mql = length
203203
Log.as_mql = log
204-
Lower.as_mql = perserve_null("toLower")
204+
Lower.as_mql = preserve_null("toLower")
205205
LTrim.as_mql = trim("ltrim")
206206
Now.as_mql = now
207207
NullIf.as_mql = null_if
@@ -212,4 +212,4 @@ def register_functions():
212212
Substr.as_mql = substr
213213
Trim.as_mql = trim("trim")
214214
TruncBase.as_mql = trunc
215-
Upper.as_mql = perserve_null("toUpper")
215+
Upper.as_mql = preserve_null("toUpper")

0 commit comments

Comments
 (0)