fix: cache invalidation on new members invite (#4699)

This commit is contained in:
Nikhil 2024-06-05 15:17:43 +05:30 committed by sriram veeraghanta
parent 272428b05e
commit 30fdc1015c
2 changed files with 12 additions and 1 deletions

View file

@ -66,7 +66,7 @@ def invalidate_cache_directly(
custom_path = path if path is not None else request.get_full_path()
auth_header = (
None
if request.user.is_anonymous
if request and request.user.is_anonymous
else str(request.user.id) if user else None
)
key = generate_cache_key(custom_path, auth_header)