Skip to content

Commit eab3c4e

Browse files
committed
Reset cell within a transaction
1 parent ffcfb02 commit eab3c4e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jupyter_server_nbmodel/handlers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ async def _execute_snippet(
146146

147147
if ycell is not None:
148148
# Reset cell
149-
del ycell["outputs"][:]
150-
ycell["execution_count"] = None
149+
with ycell.doc.transaction():
150+
del ycell["outputs"][:]
151+
ycell["execution_count"] = None
151152

152153
outputs = []
153154

0 commit comments

Comments
 (0)