-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add validation for notebook existence #860
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one quick comment about scalability, I haven't had time to check this out and test it yet though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments, one on how this related to #861 and another on scalability of the error string. Otherwise the code looks good.
I've also check it out and ran it locally and it works good. Tested it on open, run, export, and when updating properties after moving the notebook to another dir. I also checked that it works right if the notebook is moved back.
validateProperties(node: any): string { | ||
async validateProperties(node: any): Promise<string> { | ||
const notebookValidationErr = await this.app.serviceManager.contents | ||
.get(node.app_data.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if this gets merged if you could make sure to make a review comment on #861 to update it
Fixes #815. Displays this error when the notebook corresponding to a node does not exist.

Developer's Certificate of Origin 1.1