-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixes #38653 - Fix settings show endpoint #10644
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍏 LGTM
Before
$ curl -su admin:changeme "https://foreman.local.lan/api/settings/666"
{
"error": {"message":"undefined method `name' for nil:NilClass"}
}
After
~ $ curl -su admin:changeme "https://foreman.local.lan/api/settings/666"
{
"error": {"message":"Resource setting not found by id '666'"}
}
@arvind4501 please squash the commits, after that we should have green CI and I'll merge it.
- There was issue related to the api, in settings when we try to find a setting by id and if there is no setting with that id, it gives nil rather than raising exception. hammer settings info --id 1 Before:- output:- undefined method `name' for nil:NilClass After Fix:- output:- Resource setting not found by id '1'
Hey @stejskalleos , i have squashed the commits and updated branch with latest develop. thanks |
Working as expected, QE ACK |
Before I merge it, what was the original call stack of the failure? I see that by default we should go to
|
Hey @ShimShtein , so the
|
hammer settings info --id 1
Before:-
output:- undefined method `name' for nil:NilClass
After Fix:-
output:- Resource setting not found by id '1'