diff --git a/modules/weko-records/weko_records/api.py b/modules/weko-records/weko_records/api.py index 5b63e3196c..98c2c7f69d 100644 --- a/modules/weko-records/weko_records/api.py +++ b/modules/weko-records/weko_records/api.py @@ -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} @@ -956,7 +955,9 @@ 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)) @@ -964,7 +965,8 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'): # 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