X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b348f490c98762b4dfc343b5c2bf5823f821286a..22af332597f857ee4fe60ea2ebfd8723fd9d5da9:/apps/catalogue/forms.py diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 04969c2e2..391e3e429 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -3,7 +3,6 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django import forms -from django.core.files.base import ContentFile from django.utils.translation import ugettext_lazy as _ from slughifi import slughifi @@ -17,6 +16,8 @@ class BookImportForm(forms.Form): book_xml = forms.CharField(required=False) def clean(self): + from django.core.files.base import ContentFile + if not self.cleaned_data['book_xml_file']: if self.cleaned_data['book_xml']: self.cleaned_data['book_xml_file'] = \