Skip to content

Fix: Cannot query child DocType directly via frappe.db.get_list#43

Open
TubaApollo wants to merge 1 commit intodevelopmentforpeople:developfrom
TubaApollo:develop
Open

Fix: Cannot query child DocType directly via frappe.db.get_list#43
TubaApollo wants to merge 1 commit intodevelopmentforpeople:developfrom
TubaApollo:develop

Conversation

@TubaApollo
Copy link
Copy Markdown

The JavaScript code was trying to query 'DFP External Storage by Folder' directly using frappe.db.get_list(), but child DocTypes (istable=1) cannot be queried directly. This caused the error:
"DFP External Storage by Folder is not a valid parent DocType for DFP External Storage by Folder"

Solution:

  • Added a whitelisted Python method get_assigned_folders() that queries the child table properly
  • Updated JavaScript to use frappe.call() with the new method instead of frappe.db.get_list()

Fixes #33

🤖 Generated with Claude Code

The JavaScript code was trying to query 'DFP External Storage by Folder'
directly using frappe.db.get_list(), but child DocTypes (istable=1) cannot
be queried directly. This caused the error:
"DFP External Storage by Folder is not a valid parent DocType for DFP External Storage by Folder"

Solution:
- Added a whitelisted Python method `get_assigned_folders()` that queries
  the child table properly
- Updated JavaScript to use frappe.call() with the new method instead of
  frappe.db.get_list()

Fixes developmentforpeople#33

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DFP External Storage by Folder is not a valid parent DocType for DFP External Storage by Folder

2 participants