We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 664bd37 commit d19af6dCopy full SHA for d19af6d
1 file changed
modules/weko-items-ui/weko_items_ui/utils.py
@@ -4735,8 +4735,13 @@ def get_subs_item(self,
4735
key_label.append(new_label.format('0'))
4736
key_data.append('')
4737
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]
+ if data and idx < len(data):
+ 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
4745
else:
4746
m_data = None
4747
0 commit comments