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

cmd and cmd_raw raise on bad item states #1661

Merged
merged 3 commits into from
Oct 26, 2024
Merged

cmd and cmd_raw raise on bad item states #1661

merged 3 commits into from
Oct 26, 2024

Conversation

jmthomas
Copy link
Member

closes #1471

Wait until COSMOS 6 to merge this behavior change.

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.38%. Comparing base (6c85e08) to head (d220246).
Report is 51 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1661      +/-   ##
==========================================
- Coverage   76.40%   76.38%   -0.03%     
==========================================
  Files         618      618              
  Lines       46858    46901      +43     
  Branches      845      849       +4     
==========================================
+ Hits        35803    35826      +23     
- Misses      10959    10976      +17     
- Partials       96       99       +3     
Flag Coverage Δ
frontend 55.92% <ø> (-0.21%) ⬇️
python 83.88% <ø> (+0.01%) ⬆️
ruby-api 47.60% <ø> (+0.01%) ⬆️
ruby-backend 82.54% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

range_check_value = item.states[value.to_s.upcase]
else
if command.raw
unless item.states.values.include?(value)
Copy link
Member

Choose a reason for hiding this comment

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

We should allow raw or converted states unless raw. If raw then only should accept raw states.

Copy link

sonarcloud bot commented Oct 24, 2024

@ryanmelt ryanmelt merged commit bbec2f4 into main Oct 26, 2024
27 checks passed
@ryanmelt ryanmelt deleted the cmd_states branch October 26, 2024 15:35
@ryanmelt ryanmelt restored the cmd_states branch October 26, 2024 15:37
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.

Restrict command parameters to configured states
2 participants