From c3102b11e4d20a008e6be81ddd5d1b8d4309be22 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 16 May 2022 18:28:37 +0200 Subject: Generate preview image for PDF --- ishtar_common/forms_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/forms_common.py') diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 572c1b70a..57efa72cd 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -1716,7 +1716,7 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): def clean_source_page_range(self): value = self.cleaned_data.get("source_page_range", None).replace(" ", "") - if value and not re.match(r"^(\d+[-;]*\d)+$", value): + if value and not re.match(r"^(\d+[-;]*\d*)+$", value): raise forms.ValidationError(_("Incorrect page range.")) return value -- cgit v1.2.3