[fix] NoneType object has no attribute startswith, if website has not defined in the service provider's profile

This commit is contained in:
Rohit Waghchaure
2017-05-01 19:35:24 +05:30
parent f784ae346e
commit 5d048a4e35

View File

@@ -20,5 +20,5 @@ class ServiceProvider(WebsiteGenerator):
title='All Service Providers in {0}'.format(self.country))]
if self.member:
context.membership_type = frappe.get_value('Member', self.member, 'membership_type')
if not context.website.startswith('http'):
if context.website and not context.website.startswith('http'):
context.website = 'http://' + context.website