Skip to content

Commit 079ce5e

Browse files
committed
Corrige erro em update_groups
1 parent 87b2f92 commit 079ce5e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sapl/rules/apps.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def cria_usuario(self, nome, grupo):
186186
**param_username)[0]
187187
usuario.set_password('interlegis')
188188
usuario.save()
189-
grupo.user_set.add(usuario)
189+
g = Group.objects.get_or_create(name=grupo)[0]
190+
g.user_set.add(usuario)
190191

191192
def cria_usuarios_padrao(self):
192193
for group, user in (

sapl/rules/map_rules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
'view_tabelas_auxiliares'
196196
]),
197197

198-
(base.CasaLegislativa, __listdetailchange__),
198+
(base.CasaLegislativa, __listdetailchange__ + [RP_ADD]),
199199
(base.ProblemaMigracao, []),
200200
(base.Argumento, []),
201201
(base.Constraint, []),

0 commit comments

Comments
 (0)