X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/a34b95aa7ba5fd4838541d1cdcd28358fb808062..36ded31bc121ec258d35bd209d9da93224f773aa:/librarian/picture.py diff --git a/librarian/picture.py b/librarian/picture.py index ce1a551..ee3c61d 100644 --- a/librarian/picture.py +++ b/librarian/picture.py @@ -18,6 +18,9 @@ class WLPictureURI(WLURI): uri = 'http://wolnelektury.pl/katalog/obraz/%s/' % slug return cls(uri) +def as_wlpictureuri_strict(text): + return WLPictureURI.strict(text) + class PictureInfo(WorkInfo): """ @@ -33,7 +36,8 @@ class PictureInfo(WorkInfo): Field(DCNS('description.medium'), 'medium', required=False), Field(DCNS('description.dimensions'), 'original_dimensions', required=False), Field(DCNS('format'), 'mime_type', required=False), - Field(DCNS('identifier.url'), 'url', WLPictureURI, strict=WLPictureURI.strict), + Field(DCNS('identifier.url'), 'url', WLPictureURI, + strict=as_wlpictureuri_strict), )