Nicer error message when template not specified

This commit is contained in:
Kovid Goyal 2024-07-30 20:11:50 +05:30
parent ce873c757a
commit 199b435464
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -74,6 +74,9 @@ def implementation(
data[field] = {k: v.get('isbn') or '' for k, v in iteritems(x)}
continue
if field == 'template':
if not template:
data['template'] = _('Template not allowed') if is_remote else _('No template specified')
continue
vals = {}
global_vars = {}
if formatter is None: