Browse Source

Publish prev version fix

master
venkataakhil 1 year ago
parent
commit
3c42331350
  1. 4
      smart_service/apis/publish_api.py

4
smart_service/apis/publish_api.py

@ -474,8 +474,8 @@ def new_publish(args, publish_type, vehicle, language, version):
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 = "{}"
and publish_type = "Global" AND `language` = "{}" order by version desc limit 2 ;""".format(vehicle, language), as_dict=1)
pub_ver = 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 2 ;""".format(vehicle, language), as_dict=1)
if pub_ver:
prev_update_ver = pub_ver[1]["version"]
prev_full_update_file = full_update_path + vehicle + "/" + \

Loading…
Cancel
Save