diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-02-28 21:12:15 +0100 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-02-28 21:12:15 +0100 |
commit | 94e33797f7324540e9d64a623fc7c1aa18507318 (patch) | |
tree | c02f227ed8c16d0ae0b2cd12a37dc04a3137225d /sqlparse | |
parent | a9559db56679c56c0cf97ba0d5841a52d098a26c (diff) | |
download | sqlparse-94e33797f7324540e9d64a623fc7c1aa18507318.tar.gz |
Fix formatting issue with extended CASE statements.
Diffstat (limited to 'sqlparse')
-rw-r--r-- | sqlparse/filters.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlparse/filters.py b/sqlparse/filters.py index 9d1e0b9..b4f252e 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -227,8 +227,9 @@ class ReindentFilter(Filter): self.offset += outer_offset for cond, value in tlist.get_cases(): if is_first: + tcond = list(cond[0].flatten())[0] is_first = False - num_offset = self._get_offset(cond[0]) - len(cond[0].value) + num_offset = self._get_offset(tcond) - len(tcond.value) self.offset += num_offset continue if cond is None: |