X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/46a90d7cfe54bb6df2f99175abd0ad7d26b3da72..5b9ee3437b7fa98820eba7286abd524c3ede76e9:/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,