Skip to content

Commit

Permalink
Fix test and reorganize attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Feb 2, 2025
1 parent 5751e0f commit d6d841d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
22 changes: 12 additions & 10 deletions wger/manager/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,23 @@ class SetConfigData:
exercise: int

weight: Decimal | int | None = None
max_weight: Decimal | int | None = None
weight_unit: int | None = 1
weight_rounding: Decimal | int | None = None

repetitions: Decimal | int | None = None
rir: Decimal | int | None = None
rest: int | None = None
max_repetitions: Decimal | int | None = None
repetitions_unit: int | None = 1
repetitions_rounding: Decimal | int | None = None

rir: Decimal | int | None = None
max_rir: Decimal | int | None = None
max_weight: Decimal | int | None = None
max_repetitions: Decimal | int | None = None
max_rest: int | None = None
max_sets: int | None = None

rest: Decimal | int | None = None
max_rest: Decimal | int | None = None

sets: int = 1
weight_unit: int | None = 1
repetitions_unit: int | None = 1
weight_rounding: Decimal | int | None = None
repetitions_rounding: Decimal | int | None = None
max_sets: int | None = None

comment: str = ''
type: str = 'normal'
Expand Down
6 changes: 3 additions & 3 deletions wger/manager/tests/test_slot_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ def test_requirements_sets_met(self):
SetConfigData(
slot_entry_id=self.slot_entry.pk,
exercise=1,
sets=1,
sets=5,
weight=Decimal(50),
weight_rounding=Decimal(2.5),
rest=90,
rest=Decimal(90),
).__dict__,
)

Expand All @@ -331,7 +331,7 @@ def test_requirements_sets_met(self):
sets=6,
weight=Decimal(50),
weight_rounding=Decimal(2.5),
rest=90,
rest=Decimal(90),
).__dict__,
)

Expand Down

0 comments on commit d6d841d

Please sign in to comment.