Browse Source

conserta error de base/forms.py para editar autor

pull/1500/head
Lukas Ferreira 7 years ago
parent
commit
a46420e68a
  1. 3
      .gitignore
  2. 24
      package-lock.json
  3. 2
      sapl/base/forms.py

3
.gitignore

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

24
package-lock.json

@ -0,0 +1,24 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/node/-/node-8.3.0.tgz",
"integrity": "sha512-RU3iQgXeDBU45dv6BrfDrgTyUjJk1yorN64l0sce+E+2pZzFbRbBicPMBD/hWjo0GSMnA5a+RwFtWwHNDlojaw==",
"requires": {
"node-bin-setup": "1.0.6"
}
},
"node-bin-setup": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz",
"integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q=="
},
"nodejs": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/nodejs/-/nodejs-0.0.0.tgz",
"integrity": "sha1-RyL6LhisTrc6Qq4W0B41hKErdTE="
}
}
}

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