Skip to content

Commit 12fe307

Browse files
committed
Explicitly handle PicklingError.
1 parent d622d95 commit 12fe307

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

django_unicorn/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,9 @@ def get_cacheable_component(component):
6565
raise UnicornCacheError(
6666
"Cannot cache component because it is not picklable."
6767
) from e
68+
except pickle.PicklingError as e:
69+
raise UnicornCacheError(
70+
"Cannot cache component because it is not picklable."
71+
) from e
6872

6973
return component

0 commit comments

Comments
 (0)