Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Automatic linting

Github-actions4142d9a297a7
diff --git a/wger/core/models/profile.py b/wger/core/models/profile.py
index ba7ca646f..8edda7b73 100644
--- a/wger/core/models/profile.py
+++ b/wger/core/models/profile.py
@@ -523,8 +523,8 @@ by the US Department of Agriculture. It is extremely complete, with around
"""
if (
not WeightEntry.objects.filter(user=self.user).exists() or (
- datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date >
- datetime.timedelta(days=3)
+ datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date
+ > datetime.timedelta(days=3)
)
):
entry = WeightEntry()
diff --git a/wger/manager/tests/test_weight_log.py b/wger/manager/tests/test_weight_log.py
index 729be925b..aab7cbeb5 100644
--- a/wger/manager/tests/test_weight_log.py
+++ b/wger/manager/tests/test_weight_log.py
@@ -39,6 +39,7 @@ from wger.manager.models import (
from wger.utils.cache import cache_mapper
from wger.utils.constants import WORKOUT_TAB
+
logger = logging.getLogger(__name__)
diff --git a/wger/manager/views/log.py b/wger/manager/views/log.py
index 5098d87e3..4e292daf2 100644
--- a/wger/manager/views/log.py
+++ b/wger/manager/views/log.py
@@ -72,6 +72,7 @@ from wger.weight.helpers import (
process_log_entries,
)
+
logger = logging.getLogger(__name__)