Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Move the "is_dropset" flag to the slot config, which is where it belongs

Roland Geidercea3b11001de
diff --git a/wger/manager/api/serializers.py b/wger/manager/api/serializers.py
index 03861fa48..c4fa2f10d 100644
--- a/wger/manager/api/serializers.py
+++ b/wger/manager/api/serializers.py
@@ -92,7 +92,6 @@ class SlotSerializer(serializers.ModelSerializer):
'day',
'order',
'comment',
- 'is_dropset',
)
@@ -107,8 +106,11 @@ class SetConfigSerializer(serializers.ModelSerializer):
'id',
'slot',
'exercise',
+ 'is_dropset',
'repetition_unit',
+ 'repetition_rounding',
'weight_unit',
+ 'weight_rounding',
'order',
'comment',
'class_name',
diff --git a/wger/manager/migrations/0018_flexible_routines.py b/wger/manager/migrations/0018_flexible_routines.py
index 06d3223ff..058e87e68 100644
--- a/wger/manager/migrations/0018_flexible_routines.py
+++ b/wger/manager/migrations/0018_flexible_routines.py
@@ -75,7 +75,6 @@ class Migration(migrations.Migration):
),
('order', models.IntegerField(default=1, verbose_name='Order')),
('comment', models.CharField(blank=True, max_length=200, verbose_name='Comment')),
- ('is_dropset', models.BooleanField(default=False)),
(
'day',
models.ForeignKey(
@@ -99,6 +98,7 @@ class Migration(migrations.Migration):
),
),
('order', models.PositiveIntegerField(blank=True)),
+ ('is_dropset', models.BooleanField(default=False)),
('comment', models.CharField(blank=True, max_length=100)),
('class_name', models.CharField(blank=True, max_length=50, null=True)),
(
diff --git a/wger/manager/models/slot.py b/wger/manager/models/slot.py
index edb03dec2..b8c70283d 100644
--- a/wger/manager/models/slot.py
+++ b/wger/manager/models/slot.py
@@ -36,10 +36,6 @@ class Slot(models.Model):
blank=True,
)
- is_dropset = models.BooleanField(
- default=False,
- )
-
# Metaclass to set some other properties
class Meta:
ordering = [
diff --git a/wger/manager/models/slot_config.py b/wger/manager/models/slot_config.py
index e27d22cc8..44ad4a10e 100644
--- a/wger/manager/models/slot_config.py
+++ b/wger/manager/models/slot_config.py
@@ -101,6 +101,10 @@ class SlotConfig(models.Model):
blank=True,
)
+ is_dropset = models.BooleanField(
+ default=False,
+ )
+
class_name = models.CharField(
max_length=50,
null=True,