diff --git a/smart_service/apis/update_validation.py b/smart_service/apis/update_validation.py index d662ce8..6a44c4d 100644 --- a/smart_service/apis/update_validation.py +++ b/smart_service/apis/update_validation.py @@ -166,7 +166,7 @@ def check_all_vehicle_updates1(vehicle_list=None): @frappe.whitelist() def check_all_vehicle_updates(vehicle_list=None): - frappe.log_error('request' + str(vehicle_list)) + # frappe.log_error('request' + str(vehicle_list)) rate_res = custom_rate_limit(limit=5, seconds=15) if rate_res != 1: return rate_res @@ -186,8 +186,8 @@ def check_all_vehicle_updates(vehicle_list=None): vehicle_data = v_list['VehicleReqList'] publish_type = frappe.db.sql( '''SELECT publish_type FROM `tabApp Device` where name='{}';'''.format(iid), as_list=1) - frappe.log_error('publish_type' + str(publish_type)) - frappe.log_error('iid' + str(iid)) + # frappe.log_error('publish_type' + str(publish_type)) + # frappe.log_error('iid' + str(iid)) if publish_type[0][0] is not None: if vehicle_data: for v in vehicle_data: @@ -240,7 +240,7 @@ def check_all_vehicle_updates(vehicle_list=None): pass elif publish_type[0][0] == "Internal": - frappe.log_error(str('check_ful_internal')) + # frappe.log_error(str('check_ful_internal')) if current_version == float(data1[0]['version']): data1[0][UPDATE_AVAILABLE] = "false" vehicle_req_list.append(data1) @@ -249,9 +249,8 @@ def check_all_vehicle_updates(vehicle_list=None): data = frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}' and publish_status='Published' and publish_type='Internal' and vehicle_status='Active' and version > '{}' and publish_module='Automotive System' order by version ASC;'''.format(v_id, lang, current_version), as_dict=1) - # 22.06 - frappe.log_error( - 'check_ful_inter' + str(data)) + # frappe.log_error( + # 'check_ful_inter' + str(data)) publish_dec = frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}' # and publish_status='Published' and publish_type='Internal' and vehicle_status='Active' and version = '{}' and publish_module='Automotive System' # order by version ASC;'''.format(v_id, lang, data1_global[0]['version']), as_dict=1) @@ -261,15 +260,15 @@ def check_all_vehicle_updates(vehicle_list=None): data = frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}' and publish_status='Published' and publish_type='{}' and vehicle_status='Active' and version > '{}' and publish_module='Automotive System' order by version ASC;'''.format(v_id, lang, publish_type[0][0], current_version), as_dict=1) - frappe.log_error( - 'check_ful_inter_else' + str(data)) + # frappe.log_error( + # 'check_ful_inter_else' + str(data)) publish_dec = frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}' and publish_status='Published' and publish_type='Global' and vehicle_status='Active' and version ='{}' and publish_module='Automotive System' order by version ASC;'''.format(v_id, lang, data1[0]['version']), as_dict=1) # return data - else: - frappe.log_error( - 'check_ful_inter_else') + # else: + # frappe.log_error( + # 'check_ful_inter_else') data_append = [] rd = [] try: