Skip to content

Commit bb87d39

Browse files
.
2 parents f0dfc06 + 639182d commit bb87d39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sentry_sdk/integrations/django/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,8 @@ def install_sql_hook():
633633
real_execute = CursorWrapper.execute
634634
real_executemany = CursorWrapper.executemany
635635
real_connect = BaseDatabaseWrapper.connect
636-
real_commit = BaseDatabaseWrapper.commit
637-
real_rollback = BaseDatabaseWrapper.rollback
636+
real_commit = BaseDatabaseWrapper._commit
637+
real_rollback = BaseDatabaseWrapper._rollback
638638
except AttributeError:
639639
# This won't work on Django versions < 1.6
640640
return
@@ -693,7 +693,7 @@ def connect(self):
693693
return real_connect(self)
694694

695695
@ensure_integration_enabled(DjangoIntegration, real_commit)
696-
def commit(self):
696+
def _commit(self):
697697
# type: (BaseDatabaseWrapper) -> None
698698
with sentry_sdk.start_span(
699699
op=OP.DB,
@@ -704,7 +704,7 @@ def commit(self):
704704
return real_commit(self)
705705

706706
@ensure_integration_enabled(DjangoIntegration, real_rollback)
707-
def rollback(self):
707+
def _rollback(self):
708708
# type: (BaseDatabaseWrapper) -> None
709709
with sentry_sdk.start_span(
710710
op=OP.DB,
@@ -717,8 +717,8 @@ def rollback(self):
717717
CursorWrapper.execute = execute
718718
CursorWrapper.executemany = executemany
719719
BaseDatabaseWrapper.connect = connect
720-
BaseDatabaseWrapper.commit = commit
721-
BaseDatabaseWrapper.rollback = rollback
720+
BaseDatabaseWrapper._commit = _commit
721+
BaseDatabaseWrapper._rollback = _rollback
722722
ignore_logger("django.db.backends")
723723

724724

0 commit comments

Comments
 (0)