Browse Source

Fix query for publish api

master
administrator 12 months ago
parent
commit
fe2075812b
  1. 2
      smart_service/apis/publish_api.py

2
smart_service/apis/publish_api.py

@ -489,7 +489,7 @@ def new_publish(args, publish_type, vehicle, language, version):
else: else:
pub_ver = frappe.db.sql(""" SELECT vehicle,language,format(version,2) as version,modified,publish_type FROM tabPublish where vehicle = "{}" 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 work 2 ;""".format(vehicle, language), as_dict=1) and publish_type = "Global" AND `language` = "{}" order by modified desc limit 2 ;""".format(vehicle, language), as_dict=1)
if pub_ver: if pub_ver:
prev_update_ver = pub_ver[1]["version"] prev_update_ver = pub_ver[1]["version"]

Loading…
Cancel
Save