Skip to content

Commit 4c00cfc

Browse files
committed
Also reset the exercise api cache when deleting videos
This was first noticed during work on wger-project/react#1144
1 parent b3ddedb commit 4c00cfc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

wger/exercises/models/video.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,11 @@ def save(self, *args, **kwargs):
217217
reset_exercise_api_cache(self.exercise.uuid)
218218

219219
super().save(*args, **kwargs)
220+
221+
def delete(self, *args, **kwargs):
222+
"""
223+
Reset all cached infos
224+
"""
225+
reset_exercise_api_cache(self.exercise.uuid)
226+
227+
super().delete(*args, **kwargs)

0 commit comments

Comments
 (0)