Ignore group not found error creating user
This commit is contained in:
parent
99288e9183
commit
9842e63cb4
@ -209,7 +209,11 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
# make users editors by default
|
# make users editors by default
|
||||||
|
try:
|
||||||
self.groups.add(Group.objects.get(name='editor'))
|
self.groups.add(Group.objects.get(name='editor'))
|
||||||
|
except Group.objects.DoesNotExist:
|
||||||
|
# this should never happen except in tests
|
||||||
|
pass
|
||||||
|
|
||||||
# create keys and shelves for new local users
|
# create keys and shelves for new local users
|
||||||
self.key_pair = KeyPair.objects.create(
|
self.key_pair = KeyPair.objects.create(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user