mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-20 22:18:07 +00:00
Ignore group not found error creating user
This commit is contained in:
parent
99288e9183
commit
9842e63cb4
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
self.groups.add(Group.objects.get(name='editor'))
|
try:
|
||||||
|
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…
Reference in a new issue