Use user.is_authenticated bool field instead of method call
This commit is contained in:
parent
0a3d2a5b3a
commit
d3abf02912
4 changed files with 7 additions and 7 deletions
|
|
@ -240,7 +240,7 @@ class PaymentOrderView(FormView):
|
|||
template_name = 'datacenterlight/landing_payment.html'
|
||||
|
||||
def get_form_class(self):
|
||||
if self.request.user.is_authenticated():
|
||||
if self.request.user.is_authenticated:
|
||||
return BillingAddressForm
|
||||
else:
|
||||
return BillingAddressFormSignup
|
||||
|
|
@ -252,7 +252,7 @@ class PaymentOrderView(FormView):
|
|||
else:
|
||||
billing_address_data = {}
|
||||
|
||||
if self.request.user.is_authenticated():
|
||||
if self.request.user.is_authenticated:
|
||||
if billing_address_data:
|
||||
billing_address_form = BillingAddressForm(
|
||||
initial=billing_address_data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue