Skip to content

Commit 8da0a70

Browse files
committed
fix(docworker): Fix Sentry reporting for document templates
1 parent ccbc5b7 commit 8da0a70

File tree

1 file changed

+2
-1
lines changed
  • packages/dsw-document-worker/dsw/document_worker

1 file changed

+2
-1
lines changed

packages/dsw-document-worker/dsw/document_worker/worker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def filter_templates(event: sentry.Event, hint: sentry.Hint) -> sentry.Event | N
330330
phase = event.get('tags', {}).get('phase')
331331
if phase in ('render', 'prepare') and template is not None:
332332
template_config = Context.get().app.cfg.templates.get_config(template)
333-
if template_config is not None and not template_config.send_sentry:
333+
send_sentry = template_config.send_sentry if template_config else False
334+
if send_sentry:
334335
return None
335336
return event
336337

0 commit comments

Comments
 (0)