Commit 63ec5d68 authored by Sli's avatar Sli

core: fix error 500 when editing properties of user without linked customer

parent 3eb8292d
Pipeline #2020 passed with stage
in 38 minutes and 55 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment