pull/94/head
eric 2020-08-16 15:17:46 -04:00
parent 8de242df1d
commit de6f8eb6a1
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand
from regluit.core.loaders.doab_utils import online_to_download
from regluit.core.models import Ebook
from regluit.core.loader import type_for_url
from regluit.core.models.loader import type_for_url
class Command(BaseCommand):
help = "fix 'online' ebooks"

View File

@ -1198,9 +1198,8 @@ class UserProfile(models.Model):
# there should be only one active account per user
accounts = self.user.account_set.filter(date_deactivated__isnull=True)
if accounts.exists():
return None
else:
return accounts[0]
return None
@property
def old_account(self):