Use user.is_authenticated bool field instead of method call

This commit is contained in:
M.Ravi 2023-12-06 20:41:49 +05:30
commit d3abf02912
4 changed files with 7 additions and 7 deletions

View file

@ -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