Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions modules/weko-records/weko_records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,6 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'):
itemtype_id (_type_): _description_
specified_list: renew properties id list
renew_value: None, ALL, VAL, LOC

"""
# with db.session.begin_nested():
result = {"msg":"Update ItemType({})".format(itemtype_id),"code":0}
Expand Down Expand Up @@ -956,15 +955,18 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'):
tmp_data = pickle.loads(pickle.dumps(data['table_row_map']['form'][idx], -1))
_forms = json.loads(json.dumps(pickle.loads(pickle.dumps(_prop.forms, -1))).replace('parentkey',_prop_id))
data['table_row_map']['form'][idx]=pickle.loads(pickle.dumps(_forms, -1))
cls.update_attribute_options(tmp_data, data['table_row_map']['form'][idx], renew_value)

_tmp_data = data['table_row_map']['form'][idx]
cls.update_attribute_options(tmp_data, _tmp_data, renew_value)
cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'][_prop_id],data['table_row_map']['schema']['properties'][_prop_id])
else:
tmp_data = pickle.loads(pickle.dumps(data['table_row_map']['form'][idx], -1))
data['table_row_map']['schema']['properties'][_prop_id]=pickle.loads(pickle.dumps(_prop.schema, -1))
# cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'],data['table_row_map']['schema']['properties'][_prop_id])
_form = json.loads(json.dumps(pickle.loads(pickle.dumps(_prop.form, -1))).replace('parentkey',_prop_id))
data['table_row_map']['form'][idx]=pickle.loads(pickle.dumps(_form, -1))
cls.update_attribute_options(tmp_data, data['table_row_map']['form'][idx], renew_value)
_tmp_data = data['table_row_map']['form'][idx]
cls.update_attribute_options(tmp_data, _tmp_data, renew_value)
cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'][_prop_id],data['table_row_map']['schema']['properties'][_prop_id])

from weko_itemtypes_ui.utils import fix_json_schema,update_required_schema_not_exist_in_form, update_text_and_textarea
Expand Down
Loading