Skip to content
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

remove positive number validation for getRow ind. #311

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

bendichter
Copy link
Contributor

@bendichter bendichter commented Sep 29, 2021

fix #310, #573

If useID is True, then ind can be of value 0

Copy link
Collaborator

@lawrence-mbf lawrence-mbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since ind isn't used until useId is checked for on line 29, I would like to still check that the index is within a valid range if useId is not set. Something like:

if p.Results.useId
    validateattributes(ind, {'numeric'}, {'vector'});
    ind = getIndById(DynamicTable, ind);
else
    validateattributes(ind, {'numeric'}, {'positive', 'vector'});
end

@bendichter
Copy link
Contributor Author

@ln-vidrio that sounds fine

lawrence-mbf and others added 2 commits June 24, 2024 12:09
moves the index validation to after the "useIds" flag is validated.
Allow numeric ids that are not necessarily positive as ids can be
arbitrary.
If useID is True, then ind can be of value 0
@lawrence-mbf lawrence-mbf force-pushed the fix-310-get_row_by_id branch from b95f7f2 to 3a99b91 Compare June 24, 2024 16:13
@lawrence-mbf lawrence-mbf self-assigned this Jun 24, 2024
@lawrence-mbf
Copy link
Collaborator

pipeline failure allowable as that should be resolved by #575

@lawrence-mbf lawrence-mbf self-requested a review June 24, 2024 16:29
@lawrence-mbf lawrence-mbf merged commit 0333b85 into master Jun 24, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errror using dynamicTable.getRow when ID is 0
2 participants