Skip to content

Commit

Permalink
Merge pull request #29 from dgelvin/master
Browse files Browse the repository at this point in the history
Removed unnecessary proxy check
  • Loading branch information
rudyryk committed Jun 1, 2016
2 parents effe078 + 9fe4ad3 commit 31cad66
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions peewee_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,7 @@ def _swap_database(self, query):
If query database can't be swapped and differs from manager's
database, it's **WRONG AND DANGEROUS**, so assertion is raised.
"""
if query.database == self.database or \
(isinstance(query.database, peewee.Proxy) and
query.database.obj == self.database):
if query.database == self.database:
return query
elif self._subclassed(peewee.PostgresqlDatabase,
query.database,
Expand Down

0 comments on commit 31cad66

Please sign in to comment.