|
|
@ -95,7 +95,7 @@ def check_all_vehicle_updates(vehicle_list=None): |
|
|
|
current_version = float(v[CUR_VERSION]) |
|
|
|
frappe.log_error('cur', str(current_version)) |
|
|
|
data1_global = frappe.db.sql('''SELECT name,format(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' |
|
|
|
FROM `tabPublish` where vehicle='{}' and language='{}' and publish_status='Published' |
|
|
|
and vehicle_status='Active' and publish_module='Automotive System' and version = (select max(version) as version |
|
|
|
from `tabPublish` where publish_module='Automotive System' and publish_type='Global' |
|
|
|
and vehicle='{}');'''.format(v_id, lang, v_id), as_dict=1) |
|
|
@ -220,7 +220,8 @@ def check_vehicle_update(vehicle_list=None): |
|
|
|
current_version = float(v[CUR_VERSION]) |
|
|
|
data1_global = frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language FROM `tabPublish` where vehicle='{}' |
|
|
|
and language='{}' and publish_status='Published' and vehicle_status='Active' and publish_module='Automotive System' |
|
|
|
and version = (select max(version) as version from `tabPublish` where publish_module='Automotive System' and vehicle='{}'); |
|
|
|
and version = (select max(version) as version from `tabPublish` where publish_module='Automotive System' and vehicle='{}' |
|
|
|
and publish_type='Global'); |
|
|
|
'''.format(vehicle, l_id, vehicle), as_dict=1) |
|
|
|
|
|
|
|
frappe.log_error('glbal'+str(data1_global)) |
|
|
@ -548,6 +549,7 @@ def check_vehicle_update(vehicle_list=None): |
|
|
|
else: |
|
|
|
return {STATUS: 0, ERROR: "No Vehicles in criteria"} |
|
|
|
|
|
|
|
|
|
|
|
return response |
|
|
|
else: |
|
|
|
response['JSON'] = {STATUS: 0, ERROR: "Data Not available"} |
|
|
|