Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix display value for 0 rir

Roland Geider2c59351fdf13
diff --git a/wger/manager/migrations/0009_auto_20201202_1455.py b/wger/manager/migrations/0009_auto_20201202_1559.py
similarity index 80%
rename from wger/manager/migrations/0009_auto_20201202_1455.py
rename to wger/manager/migrations/0009_auto_20201202_1559.py
index 46ea860c6..f499eb5ca 100644
--- a/wger/manager/migrations/0009_auto_20201202_1455.py
+++ b/wger/manager/migrations/0009_auto_20201202_1559.py
@@ -1,4 +1,4 @@
-# Generated by Django 3.1.3 on 2020-12-02 13:55
+# Generated by Django 3.1.3 on 2020-12-02 14:59
from django.db import migrations, models
@@ -13,11 +13,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='setting',
name='rir',
- field=models.DecimalField(blank=True, choices=[(None, '------'), (0, 1), (0.5, 0.5), (1, 1), (1.5, 1.5), (2, 2), (2.5, 2.5), (3, 3), (3.5, 3.5), (4, 4)], decimal_places=1, max_digits=3, null=True, verbose_name='RiR'),
+ field=models.DecimalField(blank=True, choices=[(None, '------'), (0, 0), (0.5, 0.5), (1, 1), (1.5, 1.5), (2, 2), (2.5, 2.5), (3, 3), (3.5, 3.5), (4, 4)], decimal_places=1, max_digits=3, null=True, verbose_name='RiR'),
),
migrations.AddField(
model_name='workoutlog',
name='rir',
- field=models.DecimalField(blank=True, choices=[(None, '------'), (0, 1), (0.5, 0.5), (1, 1), (1.5, 1.5), (2, 2), (2.5, 2.5), (3, 3), (3.5, 3.5), (4, 4)], decimal_places=1, max_digits=3, null=True, verbose_name='RiR'),
+ field=models.DecimalField(blank=True, choices=[(None, '------'), (0, 0), (0.5, 0.5), (1, 1), (1.5, 1.5), (2, 2), (2.5, 2.5), (3, 3), (3.5, 3.5), (4, 4)], decimal_places=1, max_digits=3, null=True, verbose_name='RiR'),
),
]
diff --git a/wger/manager/models.py b/wger/manager/models.py
index 108a8cd09..dbdc55592 100644
--- a/wger/manager/models.py
+++ b/wger/manager/models.py
@@ -56,7 +56,7 @@ from wger.utils.fields import Html5DateField
logger = logging.getLogger(__name__)
RIR_OPTIONS = [(None, '------'),
- (0, 1),
+ (0, 0),
(0.5, 0.5),
(1, 1),
(1.5, 1.5),