Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Fix regression on calling DESC with no parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
puhitaku committed Feb 25, 2016
1 parent 46b9931 commit 1feff76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bqx/query.py
Expand Up @@ -75,6 +75,8 @@ def ASC(self):
return self._add_decorator('ORDER BY', 'ASC')

def DESC(self, *args):
if len(args) == 0:
return self._add_decorator('ORDER BY', 'DESC')
newself = deepcopy(self)
for col in args:
newself = newself._replace_partly(-1, col, col + ' DESC')
Expand Down

0 comments on commit 1feff76

Please sign in to comment.