Browse Source

add ignore

master
hns 3 years ago
parent
commit
8d90e676c4
  1. BIN
      smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc
  2. 9
      smart_service/transactions/doctype/variant_mapping/variant_mapping.py
  3. BIN
      smart_service/www/__pycache__/login.cpython-38.pyc
  4. 2
      smart_service/www/login.py

BIN
smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc

Binary file not shown.

9
smart_service/transactions/doctype/variant_mapping/variant_mapping.py

@ -9,7 +9,8 @@ class VariantMapping(Document):
pass
@frappe.whitelist()
def variant(doctype, txt, searchfield, start, page_len, filters):
#return frappe.db.sql("""SELECT name,variant,vehicle,vehicle_segment,active_status FROM _d6463952657fa86c.tabVariant order by creation desc""")
return frappe.db.sql(""" select name,variant,vehicle,vehicle_segment,active_status
FROM _d6463952657fa86c.tabVariant where
(name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") order by creation desc limit %(start)s, %(page_len)s """%{'txt': txt, 'start': start, 'page_len': page_len})
current_db_name = frappe.conf.get("db_name")
return frappe.db.sql("""SELECT name,variant,vehicle,vehicle_segment,active_status FROM {0}.tabVariant order by creation desc""".format(current_db_name))
# return frappe.db.sql(""" select name,variant,vehicle,vehicle_segment,active_status
# FROM _d6463952657fa86c.tabVariant where
# (name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") order by creation desc limit %(start)s, %(page_len)s """%{'txt': txt, 'start': start, 'page_len': page_len})

BIN
smart_service/www/__pycache__/login.cpython-38.pyc

Binary file not shown.

2
smart_service/www/login.py

@ -150,7 +150,7 @@ def login_user(login):
return 'None'
@frappe.whitelist(allow_guest=True)
def create_user(login):
user = frappe.db.sql("""select username from _d6463952657fa86c.`tabUser` where username='{0}'""".format(login),as_list=True)
user = frappe.db.sql("""select username from `tabUser` where username='{0}'""".format(login),as_list=True)
if not user:
user = frappe.new_doc("User")
user.email = login + "@mahindra.com"

Loading…
Cancel
Save