Repository navigation
ROB: Do not crash on a form field entry that is not a dictionary - #4031
Merged
stefan6419846 merged 3 commits intoAug 30, 2026
Merged
Conversation
_build_field tests /T and /TM membership on whatever the /Fields array holds, so an entry that is a number, a string or an array raised 'TypeError: argument of type NumberObject is not iterable' from reader.get_fields(). An entry it cannot read is reported and skipped, so the remaining fields are still returned.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4031 +/- ##
=======================================
Coverage 98.02% 98.03%
=======================================
Files 57 57
Lines 11165 11168 +3
Branches 2099 2100 +1
=======================================
+ Hits 10945 10948 +3
Misses 123 123
Partials 97 97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
stefan6419846
requested changes
Aug 29, 2026
get_fields is already exercised against a real form elsewhere in the suite, so the added test covered nothing new.
Contributor
Author
|
You are right, get_fields is already covered against a real form elsewhere. Removed it. |
stefan6419846
approved these changes
Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the /Fields array contains something that is not a dictionary, reading the form fields crashes. _build_field checks for /T and /TM inside each entry.
Now an entry that cannot be read is logged and skipped, so the other fields in the form are still returned instead of losing all of them.