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: Server scripts enhancements #12008

Merged
merged 4 commits into from
Dec 3, 2020

Conversation

gavindsouza
Copy link
Collaborator

@gavindsouza gavindsouza commented Nov 27, 2020

Changes

  • Validate Python code in ServerScript.script on validate
    Screenshot 2020-11-30 at 3 15 49 PM

  • Raise AttributeError for a method not found in module namespace instead of TypeError: 'NoneType' object is not callable errors

Screenshot 2020-11-30 at 3 15 26 PM
Screenshot 2020-11-30 at 3 15 07 PM

Prior to this, frappe._dict was being used to inject functions to the
server script namespaces. This meant unimplemented methods
returned None and we'd get a NoneType not callable error
@gavindsouza gavindsouza requested a review from a team November 27, 2020 10:57
@ghost ghost removed their request for review November 27, 2020 10:57
@surajshetty3416 surajshetty3416 added the add-test-cases Add test case to validate fix or enhancement label Nov 30, 2020
@gavindsouza gavindsouza removed the add-test-cases Add test case to validate fix or enhancement label Dec 3, 2020
@mergify mergify bot merged commit c394488 into frappe:develop Dec 3, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants