Skip to content

Commit

Permalink
check if action is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Nov 5, 2024
1 parent 24ac55f commit aa9be9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nxstools/nxsfileinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ def overwrite(self, metadata, cmap=None, clist=None, cmapfield=None):
else:
td[tg] = {}
td = td[tg]
if action.lower() in ["extend", "append", "e", "a"]:
if action and action.lower() \
in ["extend", "append", "e", "a"]:
if tg not in parent:
parent[tg] = []
elif not isinstance(parent[tg], list):
Expand Down

0 comments on commit aa9be9f

Please sign in to comment.