Skip to content

Commit bceaa94

Browse files
jqxl0205mitsuhiko
authored andcommitted
db __repr__ raise AttributeError when using db = SQLAlchemy() for self.app is None
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
1 parent 9fcd405 commit bceaa94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flaskext/sqlalchemy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,5 +621,5 @@ def __repr__(self):
621621
app = ctx.app
622622
return '<%s engine=%r>' % (
623623
self.__class__.__name__,
624-
app and self.app.config['SQLALCHEMY_DATABASE_URI'] or None
624+
app and app.config['SQLALCHEMY_DATABASE_URI'] or None
625625
)

0 commit comments

Comments
 (0)