mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-11 18:51:19 +00:00
linters
This commit is contained in:
parent
5707abf9e2
commit
f6649f155a
@ -74,11 +74,10 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
|||||||
form.fields['email'].help_text = _("This address must be valid.")
|
form.fields['email'].help_text = _("This address must be valid.")
|
||||||
|
|
||||||
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:
|
if not self.object.profile.report_frequency:
|
||||||
del profile_form.fields["last_report"]
|
del profile_form.fields["last_report"]
|
||||||
|
|
||||||
|
|
||||||
fields_to_check = list(profile_form.fields.keys())
|
fields_to_check = list(profile_form.fields.keys())
|
||||||
|
|
||||||
# Delete the fields for which the user does not have the permission to modify
|
# Delete the fields for which the user does not have the permission to modify
|
||||||
@ -87,7 +86,6 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
|||||||
profile_form.fields[field_name].widget = forms.HiddenInput()
|
profile_form.fields[field_name].widget = forms.HiddenInput()
|
||||||
|
|
||||||
context['profile_form'] = profile_form
|
context['profile_form'] = profile_form
|
||||||
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user