Skip to content

Commit 639182d

Browse files
wrap _commit instead of commit
1 parent 7972103 commit 639182d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/integrations/django/__init__.py

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

694694
@ensure_integration_enabled(DjangoIntegration, real_commit)
695-
def commit(self):
695+
def _commit(self):
696696
# type: (BaseDatabaseWrapper) -> None
697697
with sentry_sdk.start_span(
698698
op=OP.DB,
@@ -705,7 +705,7 @@ def commit(self):
705705
CursorWrapper.execute = execute
706706
CursorWrapper.executemany = executemany
707707
BaseDatabaseWrapper.connect = connect
708-
BaseDatabaseWrapper.commit = commit
708+
BaseDatabaseWrapper._commit = _commit
709709
ignore_logger("django.db.backends")
710710

711711

0 commit comments

Comments
 (0)