Browse Source

db name added

master
venkataakhil 2 years ago
parent
commit
77e1a26a1a
  1. 1
      smart_service/transactions/doctype/publish/publish.py

1
smart_service/transactions/doctype/publish/publish.py

@ -66,6 +66,7 @@ class Publish(Document):
# Update system and variant mapping ststus # Update system and variant mapping ststus
if self.publish_status == "Published" and self.publish_type == "Global": if self.publish_status == "Published" and self.publish_type == "Global":
current_db_name = frappe.conf.get("db_name")
global_publish = frappe.db.sql("""select name from {0}.`tabPublish` where global_publish = '{1}'""".format( global_publish = frappe.db.sql("""select name from {0}.`tabPublish` where global_publish = '{1}'""".format(
current_db_name, self.name), as_dict=True) current_db_name, self.name), as_dict=True)
for global_name in global_publish: for global_name in global_publish:

Loading…
Cancel
Save