Guard against comparing email origin with username of None.
- Legacy-Id: 15419
This commit is contained in:
parent
0ca9ec769c
commit
0c732d6538
|
@ -968,7 +968,7 @@ def edit(request, group_type=None, acronym=None, action="edit", field=None):
|
|||
group.role_set.filter(name=slug).delete()
|
||||
for e in new:
|
||||
Role.objects.get_or_create(name_id=slug, email=e, group=group, person=e.person)
|
||||
if not e.origin or e.origin == e.person.user.username:
|
||||
if not e.origin or (e.person.user and e.origin == e.person.user.username):
|
||||
e.origin = "role: %s %s" % (group.acronym, slug)
|
||||
e.save()
|
||||
|
||||
|
|
Loading…
Reference in a new issue