From 296e348a103b49b73533be76388b1d8f92bde857 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Tue, 30 May 2023 16:25:07 +0530 Subject: [PATCH] Publish update fix- remove config kilometer error --- smart_service/apis/publish_api.py | 23 +++++++++---------- .../procedure_details/procedure_details.json | 3 ++- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/smart_service/apis/publish_api.py b/smart_service/apis/publish_api.py index 9c4871c..b95337d 100644 --- a/smart_service/apis/publish_api.py +++ b/smart_service/apis/publish_api.py @@ -305,8 +305,8 @@ def new_publish(args, publish_type, vehicle, language, version): full_update_file_name = full_update_path + vehicle + '/' + \ '%s-%s-full_v%s.json' % (vehicle, language, version) - new_full_update_file_name = full_update_path + vehicle + '/' + \ - '%s-%s-full_update.json' % (vehicle, language) + # new_full_update_file_name = full_update_path + vehicle + '/' + \ + # '%s-%s-full_update.json' % (vehicle, language) """ Since full update is not available for Global version 1 """ if str(version) == '1.00': @@ -437,8 +437,8 @@ def merge_json_files(old_json_path, new_json_path, out_file_path): for old_sub_system in old_system['Subsystems']: if old_sub_system['sub_systems'] == subsystem['sub_systems']: for old_pd in old_sub_system['Procedure_details']: - proc_det_name.add( - old_pd['kilometer_name']) + # proc_det_name.add( + # old_pd['kilometer_name']) if old_pd['procedure_name'] not in proc_det_added and \ old_pd['procedure_name'] in proc_det_name: sub_system_list.append( @@ -506,7 +506,7 @@ def merge_json_files(old_json_path, new_json_path, out_file_path): "active_status": system['active_status'], "Assets": system_asset_list, "Subsystems": sub_system_list, - "Config Kilometer": conf_km_list, + # "Config Kilometer": conf_km_list, }) system_added.add(system['system_name']) except: @@ -544,9 +544,8 @@ def merge_json_files(old_json_path, new_json_path, out_file_path): data_consolidated['JSON'].append({'Variant': variant_old['Variant'], }) - json_object = json.dumps(data_consolidated) with open(out_file_path, "w") as outfile: - outfile.write(json_object) + outfile.write(json.dumps(data_consolidated,indent =4)) return True, out_file_path except Exception as e: @@ -650,8 +649,8 @@ def new_merge_json_files(old_json_path, new_json_path, out_file_path): for old_sub_system in old_system['Subsystems']: if old_sub_system['sub_systems'] == subsystem['sub_systems']: for old_pd in old_sub_system['Procedure_details']: - proc_det_name.add( - old_pd['kilometer_name']) + # proc_det_name.add( + # old_pd['kilometer_name']) if old_pd['procedure_name'] not in proc_det_added and \ old_pd['procedure_name'] in proc_det_name: sub_system_list.append( @@ -719,7 +718,7 @@ def new_merge_json_files(old_json_path, new_json_path, out_file_path): "active_status": system['active_status'], "Assets": system_asset_list, "Subsystems": sub_system_list, - "Config Kilometer": conf_km_list, + # "Config Kilometer": conf_km_list, }) system_added.add(system['system_name']) except: @@ -756,9 +755,9 @@ def new_merge_json_files(old_json_path, new_json_path, out_file_path): if variant_old['Variant']['name'] in variant_name and variant_old['Variant']['name'] not in variant_added: data_consolidated['JSON'].append({'Variant': variant_old['Variant'], }) - json_object = json.dumps(data_consolidated) + # json_object = json.dumps(data_consolidated, indent=4) with open(out_file_path, "w") as outfile: - outfile.write(json_object) + outfile.write(json.dumps(data_consolidated, indent=4)) return True, out_file_path except Exception as e: diff --git a/smart_service/transactions/doctype/procedure_details/procedure_details.json b/smart_service/transactions/doctype/procedure_details/procedure_details.json index 2181941..0b89a0c 100644 --- a/smart_service/transactions/doctype/procedure_details/procedure_details.json +++ b/smart_service/transactions/doctype/procedure_details/procedure_details.json @@ -74,13 +74,14 @@ { "fieldname": "system_id", "fieldtype": "Data", + "hidden": 1, "label": "System ID" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-05-29 13:33:52.112577", + "modified": "2023-05-30 13:25:12.568658", "modified_by": "Administrator", "module": "Transactions", "name": "Procedure_Details",