Skip to content

Commit 0d3eb2d

Browse files
committed
Fix async code examples
1 parent 2e6bc11 commit 0d3eb2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ o = MyModel()
7373
o.name = "John"
7474
with sa_manager.get_session() as session:
7575
session.add(o)
76-
session.commit()
76+
await session.commit()
7777
```
7878

7979
/// details | Long lived sessions and multithreading

docs/manager/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The interfaces are exactly the same, however you'll need to `await` the relevant
8282
```python
8383
async with sa_manager.get_session() as session:
8484
session.add(o)
85-
session.commit()
85+
await session.commit()
8686
```
8787

8888
Note that async implementation has several differences from the sync one, make sure

0 commit comments

Comments
 (0)