Skip to content

Commit 92871f2

Browse files
committed
handle recursion error in view cache
1 parent 8653b37 commit 92871f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

django_unicorn/cacher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def __enter__(self):
7777
raise UnicornCacheError(
7878
f"Cannot cache component '{type(component)}' because it is not picklable: {type(e)}: {e}"
7979
) from e
80+
except RecursionError as e:
81+
logger.warning(
82+
f"Cannot cache component '{type(component)}' because it is not picklable: {type(e)}: {e}"
83+
)
8084

8185
return self
8286

0 commit comments

Comments
 (0)