Conversation
There was a problem hiding this comment.
PR Summary:
This PR addresses a bug in the get_all_schedules function where calling this function on a document that has just been opened with HOST_APP.app.OpenDocumentFile() would result in AttributeError: 'NoneType' object has no attribute 'Settings'. The fix properly provides the document context to the get_category function call in the is_schedule function.
Review Summary:
The fix is correct, focused, and properly addresses the root cause of the issue. By ensuring the proper document context is passed to the get_category function, it prevents the NoneType error when working with newly opened documents. Please let me know if you have any feedback on this review.
Follow-up suggestions:
@devloai consider adding a unit test that verifies this functionality with a newly opened document
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25101+1501-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25104+0813-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25104+1015-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25104+1041-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25104+1127-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25105+0957-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25106+0734-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25106+1252-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25106+1322-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25106+1408-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25107+0621-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25116+1412-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25118+1113-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25119+1928-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25133+1246-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25136+0631-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25136+0639-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25140+1615-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25141+1904-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25143+0904-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25146+0559-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25149+1012-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25149+1943-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25153+1459-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25154+0858-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25154+0920-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25155+0904-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25162+1125-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25162+1306-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25162+2030-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+0700-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1347-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1420-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1830-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25171+0757-wip |
|
📦 New work-in-progress (wip) builds are available for 5.2.0.25181+1313-wip |
|
📦 New public release are available for 5.2.0.25181+1425 |
Fix bug in query get_all_schedules
Description
This pull request addresses an issue encountered when calling the
get_all_schedulesfunction in thequery.pymodule. The error,AttributeError: 'NoneType' object has no attribute 'Settings', occurs when attempting to retrieve schedules from a document that has been just opened withHOST_APP.app.OpenDocumentFile()method.Checklist
Before submitting your pull request, ensure the following requirements are met: