mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-12 03:01:17 +00:00
Update file views.py
This commit is contained in:
parent
6229652dea
commit
b2ccc4aede
@ -82,6 +82,9 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
|||||||
profile_form = self.profile_form(instance=context['user_object'].profile,
|
profile_form = self.profile_form(instance=context['user_object'].profile,
|
||||||
data=self.request.POST if self.request.POST else None)
|
data=self.request.POST if self.request.POST else None)
|
||||||
|
|
||||||
|
if not self.object.profile.report_frequency:
|
||||||
|
del profile_form.fields["last_report"]
|
||||||
|
|
||||||
# Désactivation des champs non autorisés
|
# Désactivation des champs non autorisés
|
||||||
fields_to_check = list(profile_form.fields.keys())
|
fields_to_check = list(profile_form.fields.keys())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user