Browse Source

Merge pull request #1500 from interlegis/1498-error-autor-edit

Fix #1498 conserta error de base/forms.py para editar autor
pull/1513/head
Eliseu Egewarth 7 years ago
committed by GitHub
parent
commit
df6c761189
  1. 3
      .gitignore
  2. 2
      sapl/base/forms.py

3
.gitignore

@ -6,6 +6,9 @@ __pycache__/
# C extensions
*.so
# Nodejs
node_modules/
# Distribution / packaging
.Python
env/

2
sapl/base/forms.py

@ -231,7 +231,7 @@ class AutorForm(ModelForm):
if 'status_user' in self.Meta.fields:
if self.instance.pk and self.instance.user_id:
if getattr(
self.instance.user.username,
self.instance.user,
get_user_model().USERNAME_FIELD) != cd['username']:
if 'status_user' not in cd or not cd['status_user']:
raise ValidationError(

Loading…
Cancel
Save