X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/452b47c5a7bafaba6791010094d85c7c06fdac38..062a80b51a89bf2361930461c0ad7ae5e36a2bdd:/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,