Commit d37eb134 authored by Sli's avatar Sli

Merge branch 'bugfix' into 'master'

Fix error 500 when editing properties of user without linked customer

See merge request !236
parents 3eb8292d 63ec5d68
Pipeline #2021 passed with stage
in 25 minutes and 13 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