Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use hostname as author name for exercise images

Roland Geideree8fafabd3e6
diff --git a/wger/exercises/models.py b/wger/exercises/models.py
index 4cd4b842d..d6f53fe22 100644
--- a/wger/exercises/models.py
+++ b/wger/exercises/models.py
@@ -441,7 +441,7 @@ class ExerciseImage(AbstractSubmissionModel, AbstractLicenseModel, models.Model)
if request.user.has_perm('exercises.add_exerciseimage'):
self.status = self.STATUS_ACCEPTED
if not self.license_author:
- self.license_author = 'wger.de'
+ self.license_author = request.get_host().split(':')[0]
else:
if not self.license_author: