Skip to content

Commit

Permalink
Merge pull request #75 from soujiro86/patch-1
Browse files Browse the repository at this point in the history
Fix slicing order error
  • Loading branch information
dlo committed Dec 2, 2014
2 parents 566fcec + ae479bc commit 8976c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_pyodbc/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ def _fix_slicing_order(self, outer_fields, inner_select, order, inner_table_name
alias_id += 1
# alias column name
col = '{left_sql_quote}{0}___o{1}{right_sql_quote}'.format(
col.strip(self.left_sql_quote+self.right_sql_quote),
col.strip(self.connection.ops.left_sql_quote+self.connection.ops.right_sql_quote),
alias_id,
left_sql_quote=self.left_sql_quote,
right_sql_quote=self.right_sql_quote,
left_sql_quote=self.connection.ops.left_sql_quote,
right_sql_quote=self.connection.ops.right_sql_quote,
)
# add alias to inner_select
inner_select = '({0}) AS {1}, {2}'.format(x, col, inner_select)
Expand Down

0 comments on commit 8976c81

Please sign in to comment.