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/nutrition/management/commands/import-off-products.py b/wger/nutrition/management/commands/import-off-products.py index 965ab657b..ecabb14dc 100644 --- a/wger/nutrition/management/commands/import-off-products.py +++ b/wger/nutrition/management/commands/import-off-products.py @@ -25,6 +25,7 @@ from wger.core.models import Language from wger.nutrition.models import Ingredient from wger.nutrition.off import extract_info_from_off + logger = logging.getLogger(__name__) @@ -56,8 +57,8 @@ class Command(BaseCommand): dest='mode', type=str, help='Script mode, "insert" or "update". Insert will insert the ingredients as new ' - 'entries in the database, while update will try to update them if they are ' - 'already present. Deault: insert' + 'entries in the database, while update will try to update them if they are ' + 'already present. Deault: insert' ) parser.add_argument( '--completeness', @@ -66,7 +67,7 @@ class Command(BaseCommand): dest='completeness', type=float, help='Completeness threshold for importing the products. Products in OFF have ' - 'completeness score that ranges from 0 to 1.1. Default: 0.7' + 'completeness score that ranges from 0 to 1.1. Default: 0.7' ) def handle(self, **options):