myauth: use exists

remotes/origin/license
Andrey 9 years ago
parent d38d75d961
commit 66b7c81f08
  1. 4
      project/myauth/views.py

@ -94,8 +94,8 @@ def confirm_registered_email(request, key):
models.ConfirmEmail.objects.confirm(user)
messages.add_message(request, messages.INFO, success_msg)
licenses = License.objects.filter(company=user.profile)
if not licenses:
any_licenses = License.objects.filter(company=user.profile).exists()
if not any_licenses:
license = License.objects.create_test_period_license(company=user.profile)
user.profile.confirmed = True
user.profile.active = True

Loading…
Cancel
Save