Skip to content

Commit 9fe4ad3

Browse files
committed
Removed unnecessary proxy check
1 parent 70269ab commit 9fe4ad3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

peewee_async.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,7 @@ def _swap_database(self, query):
351351
If query database can't be swapped and differs from manager's
352352
database, it's **WRONG AND DANGEROUS**, so assertion is raised.
353353
"""
354-
if query.database == self.database or \
355-
(isinstance(query.database, peewee.Proxy) and
356-
query.database.obj == self.database):
354+
if query.database == self.database:
357355
return query
358356
elif self._subclassed(peewee.PostgresqlDatabase,
359357
query.database,

0 commit comments

Comments
 (0)