Fix bug of Additional OnlineAccess and OnlineResource. #304
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.
This is a pull request to solve this issue.
Description of the bug:
pyQuARC does not flag the OnlineResource/Description, OnlineResource/Type, or OnlineAccess/Description fields whenever a URL is not provided. When ARC makes their recommendations, we also make recommendations for the fields above, even if a URL is not initially provided. The issue seems to be noticed with ECHO-C collections.
Findings:
While working with the fields OnlineResource/Description, OnlineResource/Type, or OnlineAccess/Description, we were using the checks
url_desc_presence_check
andonline_resource_type_presence_check
. These checks are linked to a check_id calledavailability_check
, which is designed to accept two arguments: field_value and parent_value.However, when I debugged the code, I noticed that our function is actually receiving only one argument, field_value. The function
one_item_presence_check
correctly uses just this single argument. To resolve this mismatch, I updated the rule mapping by changing the check_id fromavailability_check
toone_item_presence_check
.To Reproduce
Example concept ID: C1627523804-LARC (echo-c)
Now, the above fields errors are seen.