Skip to content

Commit

Permalink
invalidate cache on logo update
Browse files Browse the repository at this point in the history
  • Loading branch information
rohangpta committed Aug 17, 2023
1 parent 2a95db9 commit 6e4031e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/clubs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,8 @@ def upload(self, request, *args, **kwargs):
"""
# ensure user is allowed to upload image
club = self.get_object()
key = f"clubs:{club.id}"
cache.delete(key)

# reset approval status after upload
resp = upload_endpoint_helper(request, club, "file", "image", save=False)
Expand Down

0 comments on commit 6e4031e

Please sign in to comment.