X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/46a90d7cfe54bb6df2f99175abd0ad7d26b3da72..4c0b1c26b2e4789b194f34c907c822c55f04af3c:/apps/catalogue/management/commands/checkcovers.py diff --git a/apps/catalogue/management/commands/checkcovers.py b/apps/catalogue/management/commands/checkcovers.py index 1af39e15a..7535dd474 100644 --- a/apps/catalogue/management/commands/checkcovers.py +++ b/apps/catalogue/management/commands/checkcovers.py @@ -6,6 +6,7 @@ from optparse import make_option from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from catalogue import app_settings +from django.utils.functional import lazy def ancestor_has_cover(book): @@ -16,7 +17,7 @@ def ancestor_has_cover(book): return False -current_domain = Site.objects.get_current().domain +current_domain = lazy(lambda: Site.objects.get_current().domain, str)() def full_url(obj): return 'http://%s%s' % ( current_domain,