We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ee93457 + b65b4d1 commit 90e80a4Copy full SHA for 90e80a4
peewee_async.py
@@ -347,7 +347,9 @@ def _swap_database(self, query):
347
If query database can't be swapped and differs from manager's
348
database, it's **WRONG AND DANGEROUS**, so assertion is raised.
349
"""
350
- if query.database == self.database:
+ if query.database == self.database or \
351
+ (isinstance(query.database, peewee.Proxy) and
352
+ query.database.obj == self.database):
353
return query
354
elif self._subclassed(peewee.PostgresqlDatabase,
355
query.database,
0 commit comments