Skip to content

Commit

Permalink
Corrected dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRWinterbottom committed Nov 22, 2023
1 parent b9507f9 commit bc5c490
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion workflow/rocoto/rocoto.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def _add_data_tag(dep_dict: Dict[str, Any]) -> str:
dep_type = dep_dict.get('type', None)
dep_data = dep_dict.get('data', None)
dep_offset = dep_dict.get('offset', None)
dep_age = dep_dict.get('age', None)

if dep_data is None:
msg = f'a data value is necessary for {dep_type} dependency'
Expand All @@ -206,7 +207,10 @@ def _add_data_tag(dep_dict: Dict[str, Any]) -> str:

assert len(dep_data) == len(dep_offset)

strings = ['<datadep>']
if dep_age is None:
strings = ['<datadep>']
else:
strings = [f'<datadep age="{dep_age}">']
for data, offset in zip(dep_data, dep_offset):
if '@' in data:
offset_str = '' if offset in [None, ''] else f' offset="{offset}"'
Expand Down

0 comments on commit bc5c490

Please sign in to comment.