-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Not-urgent] LF-4380 - address comments and improvement suggestions #3510
base: integration
Are you sure you want to change the base?
Conversation
…values in oneOf schemas, update comments
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.
The updated code is much more readable and easier to follow! 👏
I left a few comments on places where I got confused.
); | ||
const isCreatingWithBreed = | ||
creating && someTruthy([default_breed_id, custom_breed_id, breed_name]); | ||
// Do checks on breed unless removing breed from existing record or |
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.
"Do checks on breed unless removing breed from existing record" - it seems to me that the next line can simply be if(someTruthy([default_breed_id, custom_breed_id, breed_name])
.
I got confused here and I may have misunderstood something.
); | ||
} | ||
// Check if custom breed or new type is present | ||
// Skip checks in some cases where new custom type or breed is added | ||
if ((custom_breed_id && !type_name) || ((default_type_id || custom_type_id) && !breed_name)) { |
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.
The combination of breed ID and type_name is wrong... isn't it already handled earlier? I'm wondering if it can be if (custom_breed_id || ((default_type_id || custom_type_id) && !breed_name))
Description
Jira link: LF-4380
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: