Skip to content

Commit 7f9d481

Browse files
committed
add check for prev_kw to not be none
1 parent fd679e4 commit 7f9d481

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sqlparse/filters/aligned_indent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def _process_default(self, tlist):
112112
_, prev_kw = tidx, token
113113
continue
114114

115-
if token.normalized == 'AND' and prev_kw.normalized == 'BETWEEN':
115+
if (token.normalized == 'AND' and prev_kw is not None and
116+
prev_kw.normalized == 'BETWEEN'):
116117
_, prev_kw = tidx, token
117118
continue
118119

0 commit comments

Comments
 (0)