Self hosted FLOSS fitness/workout, nutrition and weight tracker
Consistently use "repetitions" instead of "reps"
Roland Geidere2acd8f8a9eb
diff --git a/wger/core/api/serializers.py b/wger/core/api/serializers.pyindex a63fdcd34..03e1edd44 100644--- a/wger/core/api/serializers.py+++ b/wger/core/api/serializers.py@@ -37,7 +37,6 @@ from wger.core.models import (WeightUnit,)-logger = logging.getLogger(__name__)@@ -60,7 +59,7 @@ class UserprofileSerializer(serializers.ModelSerializer):'date_joined','gym','weight_rounding',- 'reps_rounding',+ 'repetitions_rounding','is_temporary','show_comments','show_english_ingredients',diff --git a/wger/core/migrations/0018_rounding.py b/wger/core/migrations/0018_rounding.pyindex 99403a5bc..7d6858b15 100644--- a/wger/core/migrations/0018_rounding.py+++ b/wger/core/migrations/0018_rounding.py@@ -11,7 +11,7 @@ class Migration(migrations.Migration):operations = [migrations.AddField(model_name='userprofile',- name='reps_rounding',+ name='repetitions_rounding',field=models.DecimalField(decimal_places=2, default=None, max_digits=4, null=True),),migrations.AddField(diff --git a/wger/core/models/profile.py b/wger/core/models/profile.pyindex a3bedf8be..1a61219aa 100644--- a/wger/core/models/profile.py+++ b/wger/core/models/profile.py@@ -196,7 +196,7 @@ by the US Department of Agriculture. It is extremely complete, with aroundDefault rounding for weight"""- reps_rounding = models.DecimalField(+ repetitions_rounding = models.DecimalField(default=None,null=True,max_digits=4,diff --git a/wger/manager/api/serializers.py b/wger/manager/api/serializers.pyindex de38f92ef..d36a628cf 100644--- a/wger/manager/api/serializers.py+++ b/wger/manager/api/serializers.py@@ -224,8 +224,8 @@ class SlotEntryStructureSerializer(serializers.ModelSerializer):'config','repetition_unit','repetition_rounding',- 'reps_configs',- 'max_reps_configs',+ 'repetitions_configs',+ 'max_repetitions_configs','weight_unit','weight_rounding','weight_configs',diff --git a/wger/manager/models/slot_entry.py b/wger/manager/models/slot_entry.pyindex 4a136257c..cf418407f 100644--- a/wger/manager/models/slot_entry.py+++ b/wger/manager/models/slot_entry.py@@ -155,7 +155,7 @@ class SlotEntry(models.Model):# For new entries add default rounding if availableif not self.id:if not self.repetition_rounding:- self.repetition_rounding = self.slot.day.routine.user.userprofile.reps_rounding+ self.repetition_rounding = self.slot.day.routine.user.userprofile.repetitions_roundingif not self.weight_rounding:self.weight_rounding = self.slot.day.routine.user.userprofile.weight_roundingreturn super().save(*args, **kwargs)