Commit 8ba2b28c authored by Michal Čihař's avatar Michal Čihař

Do not crash if group is not created

parent 7370309d
......@@ -60,7 +60,10 @@ def create_profile_callback(sender, **kwargs):
if newprofile:
profile.save
group = Group.objects.get(name = 'Users')
kwargs['instance'].groups.add(group)
try:
group = Group.objects.get(name = 'Users')
kwargs['instance'].groups.add(group)
except Group.DoesNotExist:
pass
post_save.connect(create_profile_callback, sender = User)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment