Try moving get_from_clause() to later.
This commit is contained in:
parent
08303f4f06
commit
5db88f12bc
|
@ -691,9 +691,6 @@ class SQLCompiler:
|
|||
order_by = None
|
||||
else:
|
||||
distinct_fields, distinct_params = self.get_distinct()
|
||||
# This must come after 'select', 'ordering', and 'distinct'
|
||||
# (see docstring of get_from_clause() for details).
|
||||
from_, f_params = self.get_from_clause()
|
||||
try:
|
||||
where, w_params = (
|
||||
self.compile(self.where) if self.where is not None else ("", [])
|
||||
|
@ -706,6 +703,9 @@ class SQLCompiler:
|
|||
having, h_params = (
|
||||
self.compile(self.having) if self.having is not None else ("", [])
|
||||
)
|
||||
# This must come after any clauses that should be able to add tables.
|
||||
# (see docstring of get_from_clause() for details).
|
||||
from_, f_params = self.get_from_clause()
|
||||
result = ["SELECT"]
|
||||
params = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue