File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- from django .db .models .expressions import Col
1
+ from django .db .models .expressions import Col , Value
2
2
3
3
4
4
def col (self , compiler , connection ): # noqa: ARG001
5
5
return f"${ self .target .column } "
6
6
7
7
8
+ def value (self , compiler , connection ): # noqa: ARG001
9
+ return self .value
10
+
11
+
8
12
def register_expressions ():
9
13
Col .as_mql = col
14
+ Value .as_mql = value
Original file line number Diff line number Diff line change @@ -138,9 +138,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
138
138
"lookup.tests.LookupQueryingTests.test_filter_exists_lhs" ,
139
139
# QuerySet.alias() doesn't work.
140
140
"lookup.tests.LookupQueryingTests.test_alias" ,
141
- # Value() not supported.
142
- "lookup.tests.LookupQueryingTests.test_annotate_literal_greater_than_field" ,
143
- "lookup.tests.LookupQueryingTests.test_annotate_value_greater_than_value" ,
144
141
# annotate() with combined expressions doesn't work:
145
142
# 'WhereNode' object has no attribute 'field'
146
143
"lookup.tests.LookupQueryingTests.test_combined_annotated_lookups_in_filter" ,
You can’t perform that action at this time.
0 commit comments