Revision a706ae94 snf-astakos-app/astakos/im/models.py
b/snf-astakos-app/astakos/im/models.py | ||
---|---|---|
498 | 498 |
|
499 | 499 |
if not self.id: |
500 | 500 |
# set username |
501 |
while not self.username: |
|
502 |
username = self.email |
|
503 |
try: |
|
504 |
AstakosUser.objects.get(username=username) |
|
505 |
except AstakosUser.DoesNotExist: |
|
506 |
self.username = username |
|
507 |
|
|
501 |
self.username = self.email |
|
502 |
|
|
508 | 503 |
self.validate_unique_email_isactive() |
509 | 504 |
if self.is_active and self.activation_sent: |
510 | 505 |
# reset the activation sent |
Also available in: Unified diff