|
|
@ -470,7 +470,7 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
|
pub_ver = None |
|
|
|
prev_update_ver = None |
|
|
|
check_if_global_exist = frappe.db.sql("""SELECT vehicle,language,format(version,2) as version,modified,publish_type FROM tabPublish where vehicle = "{}" |
|
|
|
and publish_type = "Global" AND `language` = "{}" order by modified desc limit 1 ;""".format(vehicle, language), as_dict=1) |
|
|
|
and publish_type = "Global" AND `language` = "{}" and publish_module="Automotive System" order by modified desc limit 1 ;""".format(vehicle, language), as_dict=1) |
|
|
|
|
|
|
|
if publish_type.lower() == "global": |
|
|
|
frappe.log_error(str("global")) |
|
|
@ -510,7 +510,7 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
|
"%s-%s-full_v%s.json" % (vehicle, language, version) |
|
|
|
frappe.log_error( 'update file' + str(full_update_file_name)) |
|
|
|
pub_ver = frappe.db.sql(""" SELECT vehicle,language,format(version,2) as version,modified,publish_type FROM tabPublish where vehicle = "{}" |
|
|
|
and publish_type = "Internal" AND `language` = "{}" order by modified desc limit 2 ;""".format(vehicle, language), as_dict=1) |
|
|
|
and publish_type = "Internal" AND `language` = "{}" and publish_module="Automotive System" order by modified desc limit 2 ;""".format(vehicle, language), as_dict=1) |
|
|
|
if pub_ver: |
|
|
|
frappe.log_error('inside') |
|
|
|
prev_update_ver_internal = float(pub_ver[1]["version"]) |
|
|
|