Skip to content

Commit

Permalink
Upgrade django-skivvy and django-buckets (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverroick authored and amplifi committed Apr 18, 2017
1 parent 0b57a5e commit 6d97967
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
17 changes: 4 additions & 13 deletions cadasta/accounts/views/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.utils.translation import ugettext as _
from django.contrib.messages.api import MessageFailure
from allauth.account.utils import send_email_confirmation

from rest_framework.serializers import ValidationError
Expand All @@ -26,10 +25,8 @@ def perform_update(self, serializer):
if user.email != new_email:
updated = serializer.save(email=old_email)
updated.email = new_email
try:
send_email_confirmation(self.request._request, updated)
except MessageFailure:
pass

send_email_confirmation(self.request._request, updated)
send_email_update_notification(old_email)

else:
Expand All @@ -44,10 +41,7 @@ def perform_create(self, serializer):
signals.user_registered.send(sender=self.__class__, user=user,
request=self.request)

try:
send_email_confirmation(self.request._request, user)
except MessageFailure:
pass
send_email_confirmation(self.request._request, user)


class AccountLogin(djoser_views.LoginView):
Expand All @@ -68,10 +62,7 @@ def post(self, request):
user.is_active = False
user.save()

try:
send_email_confirmation(self.request._request, user)
except MessageFailure:
pass
send_email_confirmation(self.request._request, user)

return Response(
data={'detail': _("The email has not been verified.")},
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ django-audit-log==0.7.0
django-simple-history==1.8.1
simplejson==3.8.1
django-widget-tweaks==1.4.1
django-buckets==0.1.19
django-buckets==0.1.20
pyxform-cadasta==0.9.22
python-magic==0.4.11
Pillow==3.4.2
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ tox==2.3.1
flake8==2.5.4
django-debug-toolbar==1.5
django-extensions==1.7.8
django-skivvy==0.1.4
django-skivvy==0.1.5
ipython==5.1.0

0 comments on commit 6d97967

Please sign in to comment.