Skip to content

Commit

Permalink
Check that both the entry and the max variant are set
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Nov 22, 2024
1 parent f2f5406 commit e4fd899
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wger/manager/models/slot_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,18 @@ def get_config(self, iteration: int) -> SetConfigData:
exercise=self.exercise.id,
sets=sets if sets is not None else 1,
weight=weight,
max_weight=max_weight if max_weight and max_weight > weight else None,
max_weight=max_weight if max_weight and weight and max_weight > weight else None,
weight_rounding=self.weight_rounding if weight is not None else None,
# weight_unit=self.weight_unit.pk if weight is not None else None,
weight_unit=self.weight_unit.pk,
reps=reps,
max_reps=max_reps if max_reps and max_reps > reps else None,
max_reps=max_reps if max_reps and reps and max_reps > reps else None,
reps_rounding=self.repetition_rounding if reps is not None else None,
reps_unit=self.repetition_unit.pk,
# reps_unit=self.repetition_unit.pk if reps is not None else None,
rir=self.get_rir(iteration),
rest=rest,
max_rest=max_rest if max_rest and max_rest > rest else None,
max_rest=max_rest if max_rest and rest and max_rest > rest else None,
type=str(self.type),
comment=self.comment,
)
Expand Down

0 comments on commit e4fd899

Please sign in to comment.