Skip to content

Commit d19af6d

Browse files
committed
weko#57009 fix bulk output issue
1 parent 664bd37 commit d19af6d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • modules/weko-items-ui/weko_items_ui

modules/weko-items-ui/weko_items_ui/utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4735,8 +4735,13 @@ def get_subs_item(self,
47354735
key_label.append(new_label.format('0'))
47364736
key_data.append('')
47374737
elif properties[key]['type'] in ['array', 'object']:
4738-
if data and idx < len(data) and data[idx].get(key):
4739-
m_data = data[idx][key]
4738+
if data and idx < len(data):
4739+
if isinstance(data, list) and data[idx].get(key):
4740+
m_data = data[idx][key]
4741+
elif isinstance(data, dict) and data.get(key):
4742+
m_data = data[key]
4743+
else:
4744+
m_data = None
47404745
else:
47414746
m_data = None
47424747

0 commit comments

Comments
 (0)