Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Style fixes
Pacu2544c5447ecf4
diff --git a/saleor/account/models.py b/saleor/account/models.pyindex 293ef2acd9..8f158b038c 100644--- a/saleor/account/models.py+++ b/saleor/account/models.py@@ -80,10 +80,6 @@ class UserManager(BaseUserManager):# Google OAuth2 backend send unnecessary username fieldextra_fields.pop('username', None)- token = str(uuid.uuid4())- while User.objects.filter(token=token).exists():- token = str(uuid.uuid4())- extra_fields['token'] = tokenuser = self.model(email=email, is_active=is_active, is_staff=is_staff,**extra_fields)diff --git a/saleor/account/views.py b/saleor/account/views.pyindex 6e0b5e4667..8f3ce8f614 100755--- a/saleor/account/views.py+++ b/saleor/account/views.py@@ -131,7 +131,7 @@ def address_delete(request, pk):@require_POSTdef account_delete(request, pk):user = get_object_or_404(User, pk=pk)- if request.user.token != user.token:+ if request.user.pk != user.pk:raise Http404('No such page!')send_account_delete_confirmation_email.delay()diff --git a/saleor/dashboard/customer/views.py b/saleor/dashboard/customer/views.pyindex b9d6a83644..a76b984f8e 100644--- a/saleor/dashboard/customer/views.py+++ b/saleor/dashboard/customer/views.py@@ -13,7 +13,7 @@ from ...core.utils import get_paginator_itemsfrom ..emails import send_set_password_emailfrom ..views import staff_member_requiredfrom .filters import UserFilter-from .forms import CustomerForm, CustomerNoteForm, CustomerDeleteForm+from .forms import CustomerDeleteForm, CustomerForm, CustomerNoteForm@staff_member_requireddiff --git a/templates/account/details.html b/templates/account/details.htmlindex 704317bb37..222b4b92d6 100644--- a/templates/account/details.html+++ b/templates/account/details.html@@ -157,7 +157,7 @@<form action="" method="post">{% csrf_token %}<p>- {% blocktrans context "Message above 'delete account' button"%}+ {% blocktrans context "Message informing about the process of account removal" %}If you'd like to remove your account, please click on the button below and a confirmation email will be sent to you.{% endblocktrans %}</p>