Skip to content

Commit 9fe9fc1

Browse files
committed
fix query failure on Django 1.3 or earlier
1 parent d40fffb commit 9fe9fc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql_server/pyodbc/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def as_sql(self, with_limits=True, with_col_aliases=False):
9292
result.extend(from_)
9393
params.extend(f_params)
9494

95-
if self.query.select_for_update and self.connection.features.has_select_for_update:
95+
if self.connection.features.has_select_for_update and self.query.select_for_update:
9696
# If we've been asked for a NOWAIT query but the backend does not support it,
9797
# raise a DatabaseError otherwise we could get an unexpected deadlock.
9898
nowait = self.query.select_for_update_nowait

0 commit comments

Comments
 (0)