@@ -252,9 +252,9 @@ def trunc_convert_value(self, value, expression, connection):
252
252
return _trunc_convert_value (self , value , expression , connection )
253
253
254
254
255
- def trunc_date (self , compiler , connection , ** extra ): # noqa: ARG001
255
+ def trunc_date (self , compiler , connection ):
256
256
# Cast to date rather than truncate to date.
257
- lhs_mql = process_lhs (self , compiler , connection )
257
+ lhs_mql = process_lhs (self , compiler , connection , as_path = False )
258
258
tzname = self .get_tzname ()
259
259
if tzname and tzname != "UTC" :
260
260
raise NotSupportedError (f"TruncDate with tzinfo ({ tzname } ) isn't supported on MongoDB." )
@@ -320,7 +320,7 @@ def register_functions():
320
320
Substr .as_mql_expr = substr
321
321
Trim .as_mql_expr = trim ("trim" )
322
322
TruncBase .as_mql_expr = trunc
323
- TruncBase .convert_value_expr = trunc_convert_value
323
+ TruncBase .convert_value = trunc_convert_value
324
324
TruncDate .as_mql_expr = trunc_date
325
325
TruncTime .as_mql_expr = trunc_time
326
326
Upper .as_mql_expr = preserve_null ("toUpper" )
0 commit comments