Skip to content

Commit 01223b1

Browse files
committed
Fix function names for django templates
1 parent d693da6 commit 01223b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/integrations/django/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def process_django_templates(event, hint):
157157
for i in reversed(range(len(frames))):
158158
f = frames[i]
159159
if (
160-
f.get("function") in ("parse", "render")
160+
f.get("function") in ("Parser.parse", "render")
161161
and f.get("module") == "django.template.base"
162162
):
163163
i += 1

tests/integrations/django/test_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ def test_template_exception(sentry_init, client, capture_events):
438438
(f.get("function"), f.get("module")) for f in exception["stacktrace"]["frames"]
439439
]
440440
assert filenames[-3:] == [
441-
(u"parse", u"django.template.base"),
441+
(u"Parser.parse", u"django.template.base"),
442442
(None, None),
443-
(u"invalid_block_tag", u"django.template.base"),
443+
(u"Parser.invalid_block_tag", u"django.template.base"),
444444
]
445445

446446

0 commit comments

Comments
 (0)