Self hosted FLOSS fitness/workout, nutrition and weight tracker
Total authors history bugfix
Adam Petík6ca799b4ae43
diff --git a/wger/exercises/models/base.py b/wger/exercises/models/base.pyindex 036b6287b..41cc2bc7a 100644--- a/wger/exercises/models/base.py+++ b/wger/exercises/models/base.py@@ -112,14 +112,12 @@ class ExerciseBase(AbstractLicenseModel, AbstractHistoryMixin, models.Model):"""All athors history related to the BaseExercise."""- history = self.author_historycollect_for_models = [*self.exercises.all(),*self.exercisevideo_set.all(),*self.exerciseimage_set.all(),]- history.union(collect_models_author_history(collect_for_models))- return history+ return self.author_history.union(collect_models_author_history(collect_for_models))def __str__(self):"""diff --git a/wger/utils/models.py b/wger/utils/models.pyindex b14942f09..0ea2e0794 100644--- a/wger/utils/models.py+++ b/wger/utils/models.py@@ -117,5 +117,5 @@ def collect_models_author_history(models):"""out = set()for model in models:- out.union(collect_model_author_history(model))+ out = out.union(collect_model_author_history(model))return out