X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/a34b95aa7ba5fd4838541d1cdcd28358fb808062..9e13b0c994e9d481008bef7006a74609adfd16f8:/librarian/picture.py?ds=sidebyside 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), )