Skip to content

Commit

Permalink
Merge pull request #1497 from wger-project/dependabot/pip/django-reca…
Browse files Browse the repository at this point in the history
…ptcha-approx-eq-4.0.0

Update django-recaptcha requirement from ~=3.0.0 to ~=4.0.0
  • Loading branch information
rolandgeider committed Nov 22, 2023
2 parents a23e976 + b10df79 commit ca62963
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crispy-bootstrap5==0.7
# we might need to think about migrating away from this completely
django-bootstrap-breadcrumbs2==1.0.0
django-formtools~=2.4
django-recaptcha~=3.0.0
django-recaptcha~=4.0.0
Django==4.2.6
django-activity-stream==2.0.0
django-axes==6.1.1
Expand Down
6 changes: 3 additions & 3 deletions wger/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
from django.utils.translation import gettext as _

# Third Party
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV3
from crispy_forms.helper import FormHelper
from crispy_forms.layout import (
HTML,
Expand All @@ -48,6 +46,8 @@
Row,
Submit,
)
from django_recaptcha.fields import ReCaptchaField
from django_recaptcha.widgets import ReCaptchaV3

# wger
from wger.core.models import UserProfile
Expand Down Expand Up @@ -196,7 +196,7 @@ def clean_email(self):
if not email:
return email
try:
#Performs a case-insensitive lookup
# Performs a case-insensitive lookup
user = User.objects.get(email__iexact=email)
if user.email == self.instance.email:
return email
Expand Down
4 changes: 2 additions & 2 deletions wger/core/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ def user_bodyweight(self, weight):
"""
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()
Expand Down
2 changes: 1 addition & 1 deletion wger/settings_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
'wger.measurements',

# reCaptcha support, see https://github.com/praekelt/django-recaptcha
'captcha',
'django_recaptcha',

# The sitemaps app
'django.contrib.sitemaps',
Expand Down

0 comments on commit ca62963

Please sign in to comment.