Commit 373788b3 authored by Michal Čihař's avatar Michal Čihař

Match empty email as well

This situation can be handle by regexp as well.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 3c0e2736
......@@ -1028,7 +1028,7 @@ def create_profile_callback(sender, instance, created=False, **kwargs):
'''
Automatically adds user to Users group.
'''
if created and instance.email:
if created:
# Add user to automatic groups
for auto in AutoGroup.objects.all():
if re.match(auto.match, instance.email):
......
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