From 37fa63c8b5b7a44faff1f570943b4e09f48dc9d4 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Wed, 24 May 2023 17:34:34 +0530 Subject: [PATCH] Add missing set count --- smart_service/apis/publish_api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/smart_service/apis/publish_api.py b/smart_service/apis/publish_api.py index cb06874..2d70a8a 100644 --- a/smart_service/apis/publish_api.py +++ b/smart_service/apis/publish_api.py @@ -287,7 +287,7 @@ def new_publish(args, publish_type, vehicle, language, version): """ Save file (Internal/Global) """ with open(file_name, 'w') as outfile: outfile.write(json.dumps(json_file)) - # get_step_total_count(file_name) + get_step_total_count(file_name) """ Remove previous internal publish file """ if publish_type.lower() == 'internal': @@ -311,9 +311,9 @@ def new_publish(args, publish_type, vehicle, language, version): if str(version) == '1.00': with open(full_update_file_name, 'w') as outfile: outfile.write(json.dumps(json_file)) - with open(new_full_update_file_name, 'w') as outfile: - outfile.write(json.dumps(json_file)) - # get_step_total_count(full_update_file_name) + # with open(new_full_update_file_name, 'w') as outfile: + # outfile.write(json.dumps(json_file)) + get_step_total_count(full_update_file_name) else: pub_ver = frappe.db.sql(''' SELECT vehicle,`language`,format(version,2) as version,publish_type FROM tabPublish where vehicle = '{}' @@ -326,6 +326,7 @@ def new_publish(args, publish_type, vehicle, language, version): file_flag, final_update_file = merge_json_files( prev_full_update_file, file_name, full_update_file_name) + get_step_total_count(final_update_file) if file_flag: return True, file_name.split('public')[1] else: