Browse Source

Remove update query for mapping

master
venkataakhil 1 year ago
parent
commit
4452e3aa0d
  1. 11
      smart_service/apis/support.py
  2. 10
      smart_service/transactions/doctype/system_mapping/system_mapping.py

11
smart_service/apis/support.py

@ -466,14 +466,3 @@ def remove_html_tags():
return True, 'Done' return True, 'Done'
except Exception as e: except Exception as e:
return False,e return False,e
@frappe.whitelist()
def query_update():
frappe.db.sql("""
update `tabSystem Mapping_Sub System` set procedure_is_published = "0" where parent = "THAR.AX-0001-hi-SM"
""")
frappe.db.sql("""
update `tabSystem Mapping_System Assets`set published = "0" where parent = "THAR.AX-0001-hi-SM"
""")

10
smart_service/transactions/doctype/system_mapping/system_mapping.py

@ -37,15 +37,7 @@ class SystemMapping(Document):
frappe.db.commit() frappe.db.commit()
# self.km_active_status = status.active_status # self.km_active_status = status.active_status
def validate(self): def validate(self):
if self.systems_assets:
for x in self.get("systems_assets"):
if x.system_asset:
a = x.system_asset
b = a.split(".")
if str(b[1] == "MP4"):
x.system_asset = str(b[0]) + '.mp4'
if self.system_sub_systems: if self.system_sub_systems:
for x in self.get("system_sub_systems"): for x in self.get("system_sub_systems"):
if x.procedure: if x.procedure:

Loading…
Cancel
Save