Skip to content

Commit

Permalink
Update transaction.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcouffin authored Jan 6, 2025
1 parent 22a61ff commit ba2e193
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyrevitlib/pyrevit/revit/db/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class Transaction():
Automatically rolls back if exception is raised.
```python
with Transaction('Move Wall'):
wall.DoSomething()
with Transaction('Move Wall'):
wall.DoSomething()
with Transaction('Move Wall') as action:
wall.DoSomething()
assert action.status == ActionStatus.Started # True
assert action.status == ActionStatus.Committed # True
with Transaction('Move Wall', doc, clear_after_rollback=False, show_error_dialog=False, swallow_errors=False, log_errors=True, nested=False)) as action:
wall.DoSomething()
assert action.status == ActionStatus.Started # True
assert action.status == ActionStatus.Committed # True
```
"""
def __init__(self, name=None,
Expand Down

0 comments on commit ba2e193

Please sign in to comment.