Self hosted FLOSS fitness/workout, nutrition and weight tracker
Also reset the exercise api cache when deleting videos
Roland Geider4c00cfc2ba3a
diff --git a/wger/exercises/models/video.py b/wger/exercises/models/video.pyindex 07efb2d2b..53cfe525d 100644--- a/wger/exercises/models/video.py+++ b/wger/exercises/models/video.py@@ -217,3 +217,11 @@ class ExerciseVideo(AbstractLicenseModel, AbstractHistoryMixin, models.Model):reset_exercise_api_cache(self.exercise.uuid)super().save(*args, **kwargs)++ def delete(self, *args, **kwargs):+ """+ Reset all cached infos+ """+ reset_exercise_api_cache(self.exercise.uuid)++ super().delete(*args, **kwargs)