diff --git a/core/views/user.py b/core/views/user.py index 63135872..aa3ea805 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -743,7 +743,7 @@ class UserPreferencesView(UserTabsMixin, CanEditMixin, UpdateView): kwargs = super(UserPreferencesView, self).get_context_data(**kwargs) if not hasattr(self.object, "trombi_user"): kwargs["trombi_form"] = UserTrombiForm() - if self.object.customer: + if hasattr(self.object, "customer"): kwargs["student_card_form"] = StudentCardForm() return kwargs