diff --git a/cartridge/shop/checkout.py b/cartridge/shop/checkout.py index 38320ed36..02410046f 100644 --- a/cartridge/shop/checkout.py +++ b/cartridge/shop/checkout.py @@ -5,7 +5,7 @@ from django.utils.translation import ugettext as _ from django.template.loader import get_template, TemplateDoesNotExist -from mezzanine.accounts import get_profile_for_user +from mezzanine.accounts import get_profile_for_user, ProfileNotConfigured from mezzanine.conf import settings from mezzanine.utils.email import send_mail_template @@ -126,9 +126,10 @@ def initial_order_data(request, form_class=None): # for the field value, to support custom matches on the profile # model. user_models = [request.user] - profile = get_profile_for_user(request.user) - if profile: - user_models.insert(0, profile) + try: + user_models.insert(0, get_profile_for_user(request.user)) + except ProfileNotConfigured: + pass for order_field in OrderForm._meta.fields: check_fields = [order_field] for prefix in ("billing_detail_", "shipping_detail_"):