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

FIX: use safe navigation operator for params #177

Merged
merged 3 commits into from Dec 28, 2023
Merged

Conversation

fzngagan
Copy link
Contributor

@fzngagan fzngagan commented Dec 27, 2023

Bug report: https://meta.discourse.org/t/-/289850
Solution ref: https://stackoverflow.com/questions/34794697

custom_fields might not be passed if the request is via API. We need to handle the case so that there's no error thrown(NoMethodError is being thrown currently).

I didn't include a test case because its not simple to test. Using put inside expect {} doesn't raise the error in the controller up to the invocation it seems?

@SamSaffron
Copy link
Member

test should be easy though, just don't set the custom_field param when making the request call.

You would just put and make sure you get a 200...

Copy link
Contributor

@nattsw nattsw left a comment

Choose a reason for hiding this comment

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

Doubly approved!

@fzngagan fzngagan merged commit 829424c into main Dec 28, 2023
7 checks passed
@fzngagan fzngagan deleted the cat_controller_ext_fix branch December 28, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants