0.8.31 fix registration form

This commit is contained in:
SDE
2023-12-03 19:07:49 +03:00
parent fe9be61772
commit 3b52cab162
2 changed files with 13 additions and 11 deletions

View File

@@ -34,9 +34,9 @@ class RegistrationForm(forms.Form):
i = 0
names = list(cleaned_data.keys())
while i < len(names):
# for name, val in cleaned_data.items():
if not cleaned_data[names[i]]:
self.add_error(names[i], _('Обязательное поле'))
if self.fields[names[i]].required:
self.add_error(names[i], _('Обязательное поле'))
i += 1
if cleaned_data and 'confirm_password' in cleaned_data and 'password' in cleaned_data: