Skip to content

Commit 8fb0869

Browse files
committed
add condition on django version
1 parent 0561eb6 commit 8fb0869

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

django_informixdb/compiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import django
44

55

6-
CONVERT_SELECT = django.VERSION >= (4, 0)
6+
IS_DJANGO_V4 = django.VERSION >= (4, 0)
77

88

99
class SQLCompiler(compiler.SQLCompiler):
1010
def get_select(self, with_col_aliases=False):
11-
ret, klass_info, annotations = super().get_select(with_col_aliases)
12-
if CONVERT_SELECT:
11+
if IS_DJANGO_V4:
12+
ret, klass_info, annotations = super().get_select(with_col_aliases)
1313
return [self.convert_select(node, sql, params) for node, sql, params in ret], klass_info, annotations
1414
else:
15-
return ret, klass_info, annotations
15+
return super().get_select()
1616

1717
def convert_select(self, node, sql, params):
1818
# Informix does not handle field injection in SELECT statement

0 commit comments

Comments
 (0)