Skip to content

Commit b0b1984

Browse files
committed
Exclude SafeString from the pickle checks
1 parent acc8395 commit b0b1984

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sentry/celery.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def holds_bad_pickle_object(value, memo=None):
4545
app_module = type(value).__module__
4646
if app_module.startswith(("sentry.", "getsentry.")):
4747
return value, "do not pickle custom classes"
48+
elif isinstance(value, SafeString):
49+
# Django string wrappers json encode fine
50+
return None
4851
elif app_module != "builtins":
4952
return value, "do not pickle custom classes"
5053

0 commit comments

Comments
 (0)