Skip to content

Commit b48c2da

Browse files
committed
fix scalar one query
1 parent cfb61e1 commit b48c2da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/queries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ returned rows.
5151

5252
.. code-block:: python
5353
54-
user = db.session.execute(db.select(User).filter_by(username=username)).one()
54+
user = db.session.execute(db.select(User).filter_by(username=username)).scalar_one()
5555
5656
users = db.session.execute(db.select(User).order_by(User.username)).scalars()
5757

0 commit comments

Comments
 (0)