Merge branch 'bugfix' into 'master'

Fix error 500 when editing properties of user without linked customer

See merge request ae/Sith!236
This commit is contained in:
Antoine Bartuccio 2019-09-15 17:48:21 +02:00
commit d37eb134e2
1 changed files with 1 additions and 1 deletions

View File

@ -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