Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow fetching doc fields data in API #7135

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Allow fetching fields data in API

  • Loading branch information...
chdecultot committed Mar 26, 2019
commit d652185d3841140fd58346ed606141d9c41a1042
@@ -362,9 +362,10 @@ def attach_file(filename=None, filedata=None, doctype=None, docname=None, folder
def check_parent_permission(parent, child_doctype):
if parent:
# User may pass fake parent and get the information from the child table
if child_doctype and not frappe.db.exists('DocField',
{'parent': parent, 'options': child_doctype}):
raise frappe.PermissionError
if child_doctype and child_doctype != 'DocField':
if not frappe.db.exists('DocField',
{'parent': parent, 'options': child_doctype}):
raise frappe.PermissionError

if frappe.permissions.has_permission(parent):
return
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.