Skip to content

Commit

Permalink
ContentIndexParser: Don't take 0 as missing value
Browse files Browse the repository at this point in the history
  • Loading branch information
geoo89 committed Feb 8, 2023
1 parent a5195a2 commit 6a2478b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parsers/creation/contentindexparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def map_template_arguments_to_context(self, arg_defs, args, context):
for arg_def, arg in zip(arg_defs, args + args_padding):
if arg_def.name in context:
raise ValueError(f'Template argument "{arg_def.name}" doubly defined in context')
arg_value = arg or arg_def.default_value
if not arg_value:
arg_value = arg if arg != '' else arg_def.default_value
if arg_value == '':
raise ValueError(f'Required template argument "{arg_def.name}" not provided')
if arg_def.type == 'sheet':
context[arg_def.name] = self.data_sheets[arg_value]
Expand Down

0 comments on commit 6a2478b

Please sign in to comment.