Permalink
Browse files

Get() has same syntax as where and filter

  • Loading branch information...
1 parent 4f09ad7 commit 3615225921170d3b7b74977f9d91f4f076dbe24b @coleifer committed Oct 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 peewee.py
View
@@ -1966,10 +1966,10 @@ def filter(cls, *dq, **query):
return cls.select().filter(*dq, **query)
@classmethod
- def get(cls, query=None, **kwargs):
+ def get(cls, *query, **kwargs):
sq = cls.select().naive()
if query:
- sq = sq.where(query)
+ sq = sq.where(*query)
if kwargs:
sq = sq.filter(**kwargs)
return sq.get()

0 comments on commit 3615225

Please sign in to comment.