Commit cbdf6474 authored by Michal Čihař's avatar Michal Čihař

Use named args which we expect

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 94b4617d
......@@ -731,14 +731,14 @@ def sync_create_groups(sender, app, **kwargs):
@receiver(post_save, sender=User)
def create_profile_callback(sender, **kwargs):
def create_profile_callback(sender, instance, created=False, **kwargs):
'''
Automatically adds user to Users group.
'''
if kwargs['created']:
if created:
# Add user to Users group if it exists
try:
group = Group.objects.get(name='Users')
kwargs['instance'].groups.add(group)
instance.groups.add(group)
except Group.DoesNotExist:
pass
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