Fix validator crash: column_for → find_by_property_id#13
Merged
Conversation
Validator::Runner#build_context called schema.column_for(base) which doesn't exist on SheetSchema. The correct method is find_by_property_id (added in plan 26's field-access seam). This caused Opencdd::Validator.run to crash with NoMethodError on any entity whose schema was set.
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.
Summary
Validator::Runner#build_context called
schema.column_for(base)— a method that doesn't exist onSheetSchema. The correct method isfind_by_property_id(from the field-access seam, plan 26).This caused
Opencdd::Validator.run(db)to crash withNoMethodErroron any entity whose schema was set (i.e., entities loaded from Parcel .xls files).Discovery
Found during full-data validation against all 7 scraped dictionaries (24,675 entities). Parse and finalize worked correctly; the crash was specifically in the validator.
Test plan
Opencdd::Validator.run(db)no longer crashes on schema lookup