Self hosted FLOSS fitness/workout, nutrition and weight tracker
Don't return duplicate author entries
Roland Geidera0e8e3ba357a
diff --git a/wger/utils/models.py b/wger/utils/models.pyindex be51b0483..cbfa6d696 100644--- a/wger/utils/models.py+++ b/wger/utils/models.py@@ -89,21 +89,16 @@ class AbstractSubmissionModel(models.Model):"""Status of the submission, e.g. accepted or declined"""-class AbstractHistoryMixin(models.Model):+class AbstractHistoryMixin():"""Abstract class used to model specific historical records.Utilized in conjunction with simple_history's HistoricalRecords."""-- class Meta:- abstract = True-@propertydef author_history(self):- out = []+ """Author history is the unique set of license authors from historical records"""+ out = set()for history in set(self.history.all()):- out.append(history.license_author)+ out.add(history.license_author)return set(out)-- """Author history is the unique set of license authors from historical records"""