share_7.py 324 B

12345678910
  1. def get_share_name(doctype, name, user, everyone):
  2. if cint(everyone):
  3. share_name = frappe.db.get_value("DocShare", {"everyone": 1, "share_name": name,
  4. "share_doctype": doctype})
  5. else:
  6. share_name = frappe.db.get_value("DocShare", {"user": user, "share_name": name,
  7. "share_doctype": doctype})
  8. return share_name